Clear out usage func

This commit is contained in:
Corey Johnson 2020-06-10 09:43:24 -07:00
parent 4931892cc3
commit 7d7a010739

View file

@ -59,6 +59,9 @@ func init() {
RootCmd.SetHelpFunc(rootHelpFunc)
// This will silence the usage func on error
RootCmd.SetUsageFunc(func(_ *cobra.Command) error { return nil })
RootCmd.SetFlagErrorFunc(func(cmd *cobra.Command, err error) error {
if err == pflag.ErrHelp {
return err