Skip to content

Commit

Permalink
probably fixes error message that calls images corrupt when they were…
Browse files Browse the repository at this point in the history
… just missing but honestly i'm not adding a unit test (#1107)

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 <[email protected]>
  • Loading branch information
joe-kimmel-vmw authored Jun 1, 2023
1 parent 3f1a346 commit e1a8e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e1a8e54

Please sign in to comment.