Set non-zero exit code on failures for kubectl.

This commit is contained in:
Klaus Ma
2016-10-29 17:46:05 +08:00
parent 800ef09dc1
commit fec8793b5f
8 changed files with 148 additions and 67 deletions

View File

@@ -109,12 +109,8 @@ func newCmdConfigSetAuthInfo(out io.Writer, options *createAuthInfoOptions) *cob
return
}
err := options.run()
if err != nil {
fmt.Fprintf(out, "%v\n", err)
} else {
fmt.Fprintf(out, "user %q set.\n", options.name)
}
cmdutil.CheckErr(options.run())
fmt.Fprintf(out, "User %q set.\n", options.name)
},
}