Merge pull request #69809 from sc14aec/create-context-error-messages

Fix error messages suggesting invalid flag
pull/58/head
k8s-ci-robot 2018-10-18 19:50:43 -07:00 committed by GitHub
commit 85e460e362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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