mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
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
This commit is contained in:
parent
cf7a4f8f51
commit
70a2643fdf
@ -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