Skip to content

Commit

Permalink
fix: ensure that images are properly cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Apr 29, 2023
1 parent 4c39609 commit 5ee3b79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,8 +732,10 @@ This flag can be passed multiple times to ignore different vulnerabilities`)
return 1
}

// note: we are writing out temp files which should be cleaned up after you're done with the image object
defer img.Cleanup()
defer func() {
stereoscope.Cleanup()
_ = img.Cleanup()
}()
}

pathsToLocksWithParseAs, errored := findAllLockfiles(r, cli.Args(), *parseAs, img)
Expand Down

0 comments on commit 5ee3b79

Please sign in to comment.