From 4400996c485ace88bba1cda3cc3423329fefe746 Mon Sep 17 00:00:00 2001 From: Andy Crow Date: Mon, 15 Oct 2018 16:39:53 +0100 Subject: [PATCH] Fix error messages suggesting invalid flag --- pkg/kubectl/cmd/config/create_context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubectl/cmd/config/create_context.go b/pkg/kubectl/cmd/config/create_context.go index 0a88a57950..50b965cc62 100644 --- a/pkg/kubectl/cmd/config/create_context.go +++ b/pkg/kubectl/cmd/config/create_context.go @@ -142,10 +142,10 @@ func (o *createContextOptions) complete(cmd *cobra.Command) error { func (o createContextOptions) validate() error { if len(o.name) == 0 && !o.currContext { - return errors.New("you must specify a non-empty context name or --current-context") + return errors.New("you must specify a non-empty context name or --current") } if len(o.name) > 0 && o.currContext { - return errors.New("you cannot specify a context name and --current-context") + return errors.New("you cannot specify both a context name and --current") } return nil