check: replace cleanup handler

This commit is contained in:
Michael Eischer 2024-03-29 23:28:59 +01:00
parent b15d867414
commit 21a7cb405c
1 changed files with 1 additions and 4 deletions

View File

@ -199,10 +199,7 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
}
cleanup := prepareCheckCache(opts, &gopts)
AddCleanupHandler(func(code int) (int, error) {
cleanup()
return code, nil
})
defer cleanup()
if !gopts.NoLock {
Verbosef("create exclusive lock for repository\n")