From 98c4e0d970b5a2c4fa9852401cdffca83c17886e Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 10 Jul 2017 16:30:06 -0400 Subject: [PATCH] Don't panic if an image's ID can't be parsed Return a "doesn't match" result if an image's ID can't be turned into a valid reference for any reason. Signed-off-by: Nalin Dahyabhai Closes: #217 Approved by: rhatdan --- cmd/buildah/images.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/buildah/images.go b/cmd/buildah/images.go index 9e3572b03..577947341 100644 --- a/cmd/buildah/images.go +++ b/cmd/buildah/images.go @@ -297,7 +297,7 @@ func matchesDangling(name string, dangling string) bool { func matchesLabel(image storage.Image, store storage.Store, label string) bool { storeRef, err := is.Transport.ParseStoreReference(store, "@"+image.ID) if err != nil { - + return false } img, err := storeRef.NewImage(nil) if err != nil {