From 64fac6cf49839ba058345dc471f038e5008a05f1 Mon Sep 17 00:00:00 2001 From: brianpursley Date: Wed, 12 Jan 2022 10:37:13 -0500 Subject: [PATCH] Upgrade Cobra from 1.2.1 to 1.3.0 to fix a bug where bash completions don't work when the kubectl command uses the --context flag to specify a context that contains a colon --- staging/src/k8s.io/kubectl/pkg/cmd/completion/completion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/completion/completion.go b/staging/src/k8s.io/kubectl/pkg/cmd/completion/completion.go index 8018e93fbca..db997bbfc13 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/completion/completion.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/completion/completion.go @@ -167,7 +167,7 @@ func runCompletionBash(out io.Writer, boilerPlate string, kubectl *cobra.Command return err } - return kubectl.GenBashCompletion(out) + return kubectl.GenBashCompletionV2(out, false) // TODO: Upgrade to Cobra 1.3.0 or later before including descriptions (See https://github.com/spf13/cobra/pull/1509) } func runCompletionZsh(out io.Writer, boilerPlate string, kubectl *cobra.Command) error {