Skip to content

Commit 35dea07

Browse files
committed
silence usage when pass bad cmd options
1 parent 623b697 commit 35dea07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

staging/src/k8s.io/kubectl/pkg/util/templates/templater.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func ActsAsRootCommand(cmd *cobra.Command, filters []string, groups ...CommandGr
4545
Filtered: filters,
4646
}
4747
cmd.SetFlagErrorFunc(templater.FlagErrorFunc())
48+
cmd.SilenceUsage = true
4849
cmd.SetUsageFunc(templater.UsageFunc())
4950
cmd.SetHelpFunc(templater.HelpFunc())
5051
return templater

0 commit comments

Comments
 (0)