From 84b55fb5180168bad5ceab248df2edd34502d8cb Mon Sep 17 00:00:00 2001 From: Morten Hauberg Date: Tue, 7 Apr 2020 12:54:26 +0200 Subject: [PATCH] Remove double `kubectl` from output Kubernetes-commit: 5fe57c61482611361502544f36e9df3d17898449 --- pkg/cmd/exec/exec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/exec/exec.go b/pkg/cmd/exec/exec.go index 05435e49..f55296c8 100644 --- a/pkg/cmd/exec/exec.go +++ b/pkg/cmd/exec/exec.go @@ -174,10 +174,10 @@ func (p *ExecOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, argsIn []s if argsLenAtDash > -1 { p.Command = argsIn[argsLenAtDash:] } else if len(argsIn) > 1 { - fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.\n") + fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.\n") p.Command = argsIn[1:] } else if len(argsIn) > 0 && len(p.FilenameOptions.Filenames) != 0 { - fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.\n") + fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.\n") p.Command = argsIn[0:] p.ResourceName = "" }