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:
parent
922802185f
commit
8a7b5e1b63
@ -59,10 +59,6 @@ var versionCmd = &cobra.Command{
|
||||
func init() {
|
||||
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 {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user