mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 03:18:55 +00:00
Print warning when unlocking the repo fails
This commit is contained in:
parent
666768cd17
commit
a3105799c9
@ -44,11 +44,16 @@ func runCat(gopts GlobalOptions, args []string) error {
|
||||
|
||||
if !gopts.NoLock {
|
||||
lock, err := lockRepo(gopts.ctx, repo)
|
||||
// Make the linter happy
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() { _ = unlockRepo(lock) }()
|
||||
|
||||
defer func() {
|
||||
err := unlockRepo(lock)
|
||||
if err != nil {
|
||||
Warnf("unlock repo failed: %v", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
tpe := args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user