optiopay / klar

Integration of Clair and Docker Registry
MIT License
507 stars 140 forks source link

JSON output invalid #84

Closed ghost closed 6 years ago

ghost commented 6 years ago

When trying to utilise the JSON output I have issues.

$ CLAIR_ADDR=localhost JSON_OUTPUT=true ./klar-2.0.1-linux-amd64 httpd | jq .
parse error: Invalid numeric literal at line 1, column 4

Looking at the output it's a non-json line at the top:

$ CLAIR_ADDR=localhost JSON_OUTPUT=true ./klar-2.0.1-linux-amd64 httpd | head -n1
Got results from Clair API v1

Probably would be good to omit this message or include it into the JSON stream.

hashmap commented 6 years ago

Thanks for the report, this message should be removed, sending a patch

austbot commented 6 years ago

@hashmap this is fixed in #87

hashmap commented 6 years ago

fixed in 2.0.2, thanks @austbot