0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00

fix: added error message for missing CVEs (#1085)

Signed-off-by: Ana-Roberta Lisca <ana.kagome@yahoo.com>
This commit is contained in:
Lisca Ana-Roberta 2023-01-12 01:02:29 +02:00 committed by GitHub
parent 052ad8b12e
commit 261fc2fb38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -363,6 +363,12 @@ func (search cveByImageSearcherGQL) search(config searchConfig) (bool, error) {
fmt.Fprint(config.resultWriter, builder.String())
}
if len(cveList.Data.CVEListForImage.CVEList) == 0 {
fmt.Fprint(config.resultWriter, "No CVEs found for image\n")
return true, nil
}
out, err := cveList.string(*config.outputFormat)
if err != nil {
return true, err