From 1b75b9d4549d32e19d9f52489e384a3edf1b2fe9 Mon Sep 17 00:00:00 2001 From: Magnus Kulke Date: Wed, 25 May 2016 11:09:39 +0200 Subject: [PATCH] Do not return nil on empty feature when json output is used. --- contrib/analyze-local-images/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/analyze-local-images/main.go b/contrib/analyze-local-images/main.go index 42af4de1..c619efea 100644 --- a/contrib/analyze-local-images/main.go +++ b/contrib/analyze-local-images/main.go @@ -281,7 +281,7 @@ func AnalyzeLocalImage(imageName string, minSeverity types.Priority, endpoint, m fmt.Printf("Clair report for image %s (%s)\n", imageName, time.Now().UTC()) } - if len(layer.Features) == 0 { + if len(layer.Features) == 0 && !jsonOutput { fmt.Printf("%s No features have been detected in the image. This usually means that the image isn't supported by Clair.\n", color.YellowString("NOTE:")) return nil }