Hide global flags for version command.
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
parent
16edfc4fec
commit
b01b11876d
@ -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)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user