Hide global flags for version command.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-05-13 12:22:42 +02:00
parent 16edfc4fec
commit b01b11876d

View File

@ -61,6 +61,10 @@ var versionCmd = &cobra.Command{
func init() { func init() {
versionCmd.Flags().Bool("check", false, "check if dagger is up to date") versionCmd.Flags().Bool("check", false, "check if dagger is up to date")
versionCmd.InheritedFlags().MarkHidden("environment")
versionCmd.InheritedFlags().MarkHidden("log-level")
versionCmd.InheritedFlags().MarkHidden("log-format")
if err := viper.BindPFlags(versionCmd.Flags()); err != nil { if err := viper.BindPFlags(versionCmd.Flags()); err != nil {
panic(err) panic(err)
} }