We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4931892 commit 7d7a010Copy full SHA for 7d7a010
command/root.go
@@ -59,6 +59,9 @@ func init() {
59
60
RootCmd.SetHelpFunc(rootHelpFunc)
61
62
+ // This will silence the usage func on error
63
+ RootCmd.SetUsageFunc(func(_ *cobra.Command) error { return nil })
64
+
65
RootCmd.SetFlagErrorFunc(func(cmd *cobra.Command, err error) error {
66
if err == pflag.ErrHelp {
67
return err
0 commit comments