lock: drop cleanup handler
This commit is contained in:
parent
21a7cb405c
commit
93135dc705
1 changed files with 2 additions and 9 deletions
|
@ -21,18 +21,11 @@ func internalOpenWithLocked(ctx context.Context, gopts GlobalOptions, dryRun boo
|
||||||
Verbosef("%s", msg)
|
Verbosef("%s", msg)
|
||||||
}
|
}
|
||||||
}, Warnf)
|
}, Warnf)
|
||||||
|
|
||||||
unlock = lock.Unlock
|
|
||||||
// make sure that a repository is unlocked properly and after cancel() was
|
|
||||||
// called by the cleanup handler in global.go
|
|
||||||
AddCleanupHandler(func(code int) (int, error) {
|
|
||||||
lock.Unlock()
|
|
||||||
return code, nil
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unlock = lock.Unlock
|
||||||
} else {
|
} else {
|
||||||
repo.SetDryRun()
|
repo.SetDryRun()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue