Do not return nil on empty feature when json output is used.

This commit is contained in:
Magnus Kulke 2016-05-25 11:09:39 +02:00
parent 8063fc9b2d
commit 1b75b9d454

View File

@ -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
}