check: Make sure temp cache dir is removed

This commit is contained in:
Alexander Neumann 2018-04-01 18:09:53 +02:00
parent 2c964df3e2
commit 01fe719aff
1 changed files with 4 additions and 1 deletions

View File

@ -164,7 +164,10 @@ func runCheck(opts CheckOptions, gopts GlobalOptions, args []string) error {
}
cleanup := prepareCheckCache(opts, &gopts)
defer cleanup()
AddCleanupHandler(func() error {
cleanup()
return nil
})
repo, err := OpenRepository(gopts)
if err != nil {