1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2025-01-13 17:21:03 +00:00

Add missing error output if JSON output can't be emitted

This commit is contained in:
Liz Rice 2017-06-23 09:40:53 +01:00
parent 44136fa080
commit 1be52fb304

View File

@ -112,6 +112,8 @@ func runChecks(t check.NodeType) {
if jsonFmt {
out, err := controls.JSON()
if err != nil {
fmt.Fprintf(os.Stderr, "failed to output in JSON format: %v\n", err)
os.Exit(1)
}
fmt.Println(string(out))