mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #43900 from CaoShuFeng/cani-quiet
Automatic merge from submit-queue (batch tested with PRs 43900, 44152, 44324) fix return value of "kubectl auth cani --quiet" Before this change: $ kubectl auth can-i get pod no $ kubectl auth can-i get pod --quiet $ echo $? 0 After this change: $ kubectl auth can-i get pod no $ kubectl auth can-i get pod --quiet $ echo $? 1 @deads2k **Release note**: ```NONE ```
This commit is contained in:
commit
da1fe12133
@ -90,11 +90,9 @@ func NewCmdCanI(f cmdutil.Factory, out, err io.Writer) *cobra.Command {
|
||||
|
||||
allowed, err := o.RunAccessCheck()
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if o.Quiet && !allowed {
|
||||
os.Exit(1)
|
||||
if o.Quiet && !allowed {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
cmdutil.CheckErr(err)
|
||||
|
Loading…
Reference in New Issue
Block a user