mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
fix: added error message for missing CVEs (#1085)
Signed-off-by: Ana-Roberta Lisca <ana.kagome@yahoo.com>
This commit is contained in:
committed by
GitHub
parent
052ad8b12e
commit
261fc2fb38
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user