From 0dda0ad102ec961749620f9f130e957cc2c8256d Mon Sep 17 00:00:00 2001 From: Xiangxuan Liu Date: Thu, 21 Nov 2019 16:24:12 +0800 Subject: [PATCH] Return "unknown command" error for unknown subcommands Signed-off-by: Xiangxuan Liu (cherry picked from commit 8f962a270c65e703b07fb749f80ed67855d92f23) --- cmd/helm/root.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/helm/root.go b/cmd/helm/root.go index 6ce1dcbf4..339ea15b3 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -25,7 +25,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "helm.sh/helm/v3/cmd/helm/require" "helm.sh/helm/v3/internal/completion" "helm.sh/helm/v3/internal/experimental/registry" "helm.sh/helm/v3/pkg/action" @@ -100,8 +99,7 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string Short: "The Helm package manager for Kubernetes.", Long: globalUsage, SilenceUsage: true, - Args: require.NoArgs, - BashCompletionFunction: fmt.Sprintf("%s%s", contextCompFunc, completion.GetBashCustomFunction()), + BashCompletionFunction: completion.GetBashCustomFunction(), } flags := cmd.PersistentFlags()