fix: handle empty image meta

This commit is contained in:
decentral1se 2021-12-19 23:14:43 +01:00
parent a750344653
commit 033bad3d10
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 5 additions and 1 deletions

View File

@ -402,7 +402,11 @@ func GetImageMetadata(imageRowString, recipeName string) (image, error) {
}
if len(imgFields) < 3 {
logrus.Warnf("%s image meta has incorrect format: %s", recipeName, imageRowString)
if imageRowString != "" {
logrus.Warnf("%s image meta has incorrect format: %s", recipeName, imageRowString)
} else {
logrus.Warnf("%s image meta is empty?", recipeName)
}
return img, nil
}