mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Fix error messages suggesting invalid flag
This commit is contained in:
parent
8928e70af9
commit
4400996c48
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user