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:
parent
052ad8b12e
commit
261fc2fb38
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue