mirror of
https://github.com/octoleo/restic.git
synced 2024-11-11 07:41:03 +00:00
check: replace cleanup handler
This commit is contained in:
parent
b15d867414
commit
21a7cb405c
@ -199,10 +199,7 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup := prepareCheckCache(opts, &gopts)
|
cleanup := prepareCheckCache(opts, &gopts)
|
||||||
AddCleanupHandler(func(code int) (int, error) {
|
defer cleanup()
|
||||||
cleanup()
|
|
||||||
return code, nil
|
|
||||||
})
|
|
||||||
|
|
||||||
if !gopts.NoLock {
|
if !gopts.NoLock {
|
||||||
Verbosef("create exclusive lock for repository\n")
|
Verbosef("create exclusive lock for repository\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user