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:
Kubernetes Submit Queue 2017-04-11 07:57:13 -07:00 committed by GitHub
commit da1fe12133

View File

@ -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)