mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-11 23:49:30 -05:00
cli: fix command order and minor wording tweaks in config cmd
This commit is contained in:
parent
88ec7397c9
commit
9f0c751f1b
@ -8,7 +8,7 @@ func newConfigCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "Work with the Constellation configuration file",
|
||||
Long: "Generate & manipulate configuration file for Constellation.",
|
||||
Long: "Generate a configuration file for Constellation.",
|
||||
Args: cobra.ExactArgs(0),
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ func newConfigGenerateCmd() *cobra.Command {
|
||||
ValidArgsFunction: generateCompletion,
|
||||
RunE: runConfigGenerate,
|
||||
}
|
||||
cmd.Flags().StringP("file", "f", constants.ConfigFilename, "output file")
|
||||
cmd.Flags().StringP("file", "f", constants.ConfigFilename, "path to output file, or '-' for stdout")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
@ -30,16 +30,16 @@ func NewRootCmd() *cobra.Command {
|
||||
// Set output of cmd.Print to stdout. (By default, it's stderr.)
|
||||
rootCmd.SetOut(os.Stdout)
|
||||
|
||||
rootCmd.PersistentFlags().String("config", constants.ConfigFilename, "use settings from a config")
|
||||
rootCmd.PersistentFlags().String("config", constants.ConfigFilename, "path to the configuration file")
|
||||
must(rootCmd.MarkPersistentFlagFilename("config", "json"))
|
||||
|
||||
rootCmd.AddCommand(newConfigCmd())
|
||||
rootCmd.AddCommand(newCreateCmd())
|
||||
rootCmd.AddCommand(newInitCmd())
|
||||
rootCmd.AddCommand(newVerifyCmd())
|
||||
rootCmd.AddCommand(newRecoverCmd())
|
||||
rootCmd.AddCommand(newTerminateCmd())
|
||||
rootCmd.AddCommand(newVersionCmd())
|
||||
rootCmd.AddCommand(newConfigCmd())
|
||||
|
||||
return rootCmd
|
||||
}
|
||||
|
@ -7,10 +7,12 @@ import (
|
||||
"regexp"
|
||||
|
||||
"github.com/edgelesssys/constellation/cli/cmd"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/cobra/doc"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cobra.EnableCommandSorting = false
|
||||
rootCmd := cmd.NewRootCmd()
|
||||
rootCmd.DisableAutoGenTag = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user