From aaed950465407688b1858e8cb78d9ea81cbbe7ba Mon Sep 17 00:00:00 2001 From: Joe Kimmel Date: Tue, 30 May 2023 15:28:58 -0700 Subject: [PATCH] probably fixes error message that calls images corrupt when they were just missing but honestly i'm not adding a unit test Previously: Treat images like politicians (if you suddenly can't find them, they're probably corrupt). Now: Treat images like accounting errors (if you can't find any, there's no evidence of corruption) Signed-off-by: Joe Kimmel --- analyzer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analyzer.go b/analyzer.go index f4bab28fe..f6bb8a120 100644 --- a/analyzer.go +++ b/analyzer.go @@ -295,7 +295,7 @@ func (a *Analyzer) retrieveAppMetadata() (platform.LayersMetadata, string, error if err != nil { return platform.LayersMetadata{}, "", errors.Wrap(err, "identifying previous image") } - if !a.PreviousImage.Valid() { + if a.PreviousImage.Found() && !a.PreviousImage.Valid() { a.Logger.Infof("Ignoring image %q because it was corrupt", a.PreviousImage.Name()) return platform.LayersMetadata{}, "", nil }