Commit 4400996c authored by Andy Crow's avatar Andy Crow

Fix error messages suggesting invalid flag

parent 8928e70a
...@@ -142,10 +142,10 @@ func (o *createContextOptions) complete(cmd *cobra.Command) error { ...@@ -142,10 +142,10 @@ func (o *createContextOptions) complete(cmd *cobra.Command) error {
func (o createContextOptions) validate() error { func (o createContextOptions) validate() error {
if len(o.name) == 0 && !o.currContext { 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 { 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 return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment