From 28dfdd081d1051cd1f19c7182756dbedf1ab12bc Mon Sep 17 00:00:00 2001 From: Eli Wrenn Date: Tue, 26 Jan 2021 08:37:03 -0800 Subject: [PATCH] Fix regression from bumping cobrautil * Missed scoping the DisallowingExtraArgs to leaf commands, which was causing the top level kapp to no longer output the help text when an unkown command was used Authored-by: Eli Wrenn --- pkg/kapp/cmd/kapp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kapp/cmd/kapp.go b/pkg/kapp/cmd/kapp.go index a52595c36..4f7661b59 100644 --- a/pkg/kapp/cmd/kapp.go +++ b/pkg/kapp/cmd/kapp.go @@ -135,7 +135,7 @@ func NewKappCmd(o *KappOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Comman // Last one runs first cobrautil.VisitCommands(cmd, finishDebugLog, cobrautil.ReconfigureCmdWithSubcmd, - cobrautil.DisallowExtraArgs, configureUIAndLogger, cobrautil.WrapRunEForCmd(cobrautil.ResolveFlagsForCmd)) + cobrautil.ReconfigureLeafCmds(cobrautil.DisallowExtraArgs), configureUIAndLogger, cobrautil.WrapRunEForCmd(cobrautil.ResolveFlagsForCmd)) return cmd }