cli: minor cleanup in root cmd init

This commit is contained in:
Thomas Tendyck 2022-04-29 17:06:58 +02:00 committed by Thomas Tendyck
parent 8d73aab0ce
commit 1408b36db7

View File

@ -52,10 +52,8 @@ func signalContext(ctx context.Context, sig os.Signal) (context.Context, context
func init() { func init() {
cobra.EnableCommandSorting = false cobra.EnableCommandSorting = false
// Set output of cmd.Print to stdout. // Set output of cmd.Print to stdout. (By default, it's stderr.)
rootCmd.SetOut(os.Stdout) rootCmd.SetOut(os.Stdout)
// Disable --no-description flag for completion command.
rootCmd.CompletionOptions.DisableNoDescFlag = true
rootCmd.PersistentFlags().String("dev-config", "", "Set this flag to create the Constellation using settings from a development config.") rootCmd.PersistentFlags().String("dev-config", "", "Set this flag to create the Constellation using settings from a development config.")
rootCmd.AddCommand(newCreateCmd()) rootCmd.AddCommand(newCreateCmd())
rootCmd.AddCommand(newInitCmd()) rootCmd.AddCommand(newInitCmd())