Merge pull request #110267 from TinySong/auth-cani

update auto can-i error message
This commit is contained in:
Kubernetes Prow Robot 2022-09-12 12:01:05 -07:00 committed by GitHub
commit 5858aa2bef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,9 @@ func (o *CanIOptions) Complete(f cmdutil.Factory, args []string) error {
o.ResourceName = resourceTokens[1]
}
default:
return errors.New("you must specify two or three arguments: verb, resource, and optional resourceName")
errString := "you must specify two arguments: verb resource or verb resource/resourceName."
usageString := "See 'kubectl auth can-i -h' for help and examples."
return errors.New(fmt.Sprintf("%s\n%s", errString, usageString))
}
}