Fix env & log global flags are no longer hidden.

There was a hack in `version.go` that was hiding unused flag from
that command.
The problem is that the effect has spread to all commands.

I've removed that trick to correctly display all flags because it's
important for users to know how select an environment and configure
log format.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-08-20 17:06:22 +02:00
parent 922802185f
commit 8a7b5e1b63
No known key found for this signature in database
GPG Key ID: 3C9847D981AAC1BF

View File

@ -59,10 +59,6 @@ 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)
} }