From 033bad3d10c1ca3afe16a7804f7bff69e4eecc88 Mon Sep 17 00:00:00 2001 From: cellarspoon Date: Sun, 19 Dec 2021 23:14:43 +0100 Subject: [PATCH] fix: handle empty image meta --- pkg/catalogue/catalogue.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/catalogue/catalogue.go b/pkg/catalogue/catalogue.go index 075cc930..3f3fb3f8 100644 --- a/pkg/catalogue/catalogue.go +++ b/pkg/catalogue/catalogue.go @@ -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 }