mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-18 17:37:03 +00:00
Improve handling of cmdline errors
This commit is contained in:
parent
c88282c0a1
commit
886e00e03f
1 changed files with 3 additions and 3 deletions
|
|
@ -49,13 +49,13 @@ func processResults(cancel context.CancelFunc, o output.Output, validationResult
|
|||
func realMain() int {
|
||||
cfg, out, err := config.FromFlags(os.Args[0], os.Args[1:])
|
||||
if out != "" {
|
||||
out := os.Stderr
|
||||
o := os.Stderr
|
||||
errCode := 1
|
||||
if cfg.Help {
|
||||
out = os.Stdout
|
||||
o = os.Stdout
|
||||
errCode = 0
|
||||
}
|
||||
fmt.Fprintln(out, out)
|
||||
fmt.Fprintln(o, out)
|
||||
return errCode
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue