diff --git a/internal/cli/root.go b/internal/cli/root.go index 7096c861a..ccfcd6541 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -5,15 +5,11 @@ import ( "os" "github.com/auth0/auth0-cli/internal/display" - "github.com/spf13/afero" "github.com/spf13/cobra" ) // Execute is the primary entrypoint of the CLI app. func Execute() { - // fs is a mock friendly os.File interface. - fs := afero.NewOsFs() - // cfg contains tenant related information, e.g. `travel0-dev`, // `travel0-prod`. some of its information can be sourced via: // 1. env var (e.g. AUTH0_API_KEY) @@ -28,7 +24,7 @@ func Execute() { SilenceUsage: true, SilenceErrors: true, Short: "Command-line tool to interact with Auth0.", - Long: "Command-line tool to interact with Auth0.\n" + getLogin(&fs, cli), + Long: "Command-line tool to interact with Auth0.\n" + getLogin(cli), PersistentPreRunE: func(cmd *cobra.Command, args []string) error { // If the user is trying to login, no need to go @@ -46,7 +42,7 @@ func Execute() { rootCmd.SetUsageTemplate(namespaceUsageTemplate()) rootCmd.PersistentFlags().StringVar(&cli.tenant, - "tenant", "", "Specific tenant to use.") + "tenant", cli.config.DefaultTenant, "Specific tenant to use.") rootCmd.PersistentFlags().BoolVar(&cli.verbose, "verbose", false, "Enable verbose mode.")