@@ -12,12 +12,11 @@ import (
1212 "strconv"
1313 "strings"
1414
15- "github.com/auth0/go-auth0/management"
16- "github.com/spf13/cobra"
17-
1815 "github.com/auth0/auth0-cli/internal/ansi"
1916 "github.com/auth0/auth0-cli/internal/auth0"
2017 "github.com/auth0/auth0-cli/internal/prompt"
18+ "github.com/auth0/go-auth0/management"
19+ "github.com/spf13/cobra"
2120)
2221
2322// QuickStart app types and defaults.
@@ -724,27 +723,23 @@ func setupQuickstartCmdExperimental(cli *cli) *cobra.Command {
724723
725724 if err != nil {
726725 return fmt .Errorf ("failed to create application: %w" , err )
726+ }
727+
728+ if client .GetAppType () == "resource_server" {
729+ printClientDetails (client , inputs .Port , "" , true )
727730 } else {
728- if client .GetAppType () == "resource_server" {
729- printClientDetails (client , inputs .Port , "" , true )
730- } else {
731- // cli.renderer.Infof("Application created successfully with Client ID: %s", client.GetClientID())
732- tenant , err := cli .Config .GetTenant (cli .tenant )
733- if err != nil {
734- return fmt .Errorf ("failed to get tenant: %w" , err )
735- }
736- // Generate the .env file
737- envFileName , _ , err := GenerateAndWriteQuickstartConfig (& config .Strategy , config .EnvValues , tenant .Domain , client )
738- if err != nil {
739- return fmt .Errorf ("failed to generate .env file: %w" , err )
740- }
741- // cli.renderer.Infof("%s file created successfully with your Auth0 configuration\n", envFileName)
742- printClientDetails (client , inputs .Port , envFileName , false )
731+ tenant , err := cli .Config .GetTenant (cli .tenant )
732+ if err != nil {
733+ return fmt .Errorf ("failed to get tenant: %w" , err )
734+ }
735+ // Generate the .env file
736+ envFileName , _ , err := GenerateAndWriteQuickstartConfig (& config .Strategy , config .EnvValues , tenant .Domain , client )
737+ if err != nil {
738+ return fmt .Errorf ("failed to generate .env file: %w" , err )
743739 }
740+ printClientDetails (client , inputs .Port , envFileName , false )
744741 }
745-
746742 }
747-
748743 return nil
749744 },
750745 }
@@ -841,7 +836,6 @@ func getQuickstartConfigKey(inputs struct {
841836 OfflineAccess bool
842837 MetaData map [string ]interface {}
843838}, error ) {
844-
845839 // Prompt for target resource(s) when neither flag is provided.
846840 if ! inputs .App && ! inputs .API {
847841 var selections []string
@@ -875,7 +869,6 @@ func getQuickstartConfigKey(inputs struct {
875869 // Prompt for --type if not provided
876870 if inputs .Type == "" {
877871 types := []string {"spa" , "regular" , "native" , "m2m" }
878- // name, message, help, options, defaultValue, required
879872 q := prompt .SelectInput ("type" , "Select the application type" , "" , types , "m2m" , true )
880873 if err := prompt .AskOne (q , & inputs .Type ); err != nil {
881874 return "" , inputs , fmt .Errorf ("failed to select application type: %v" , err )
0 commit comments