forked from TrueCloudLab/restic
tag: fix swallowed error if repository cannot be opened
This commit is contained in:
parent
0df2fa8135
commit
986d981bf6
2 changed files with 8 additions and 1 deletions
7
changelog/unreleased/issue-5050
Normal file
7
changelog/unreleased/issue-5050
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Bugfix: Missing error if `tag` fails to lock repository
|
||||||
|
|
||||||
|
Since restic 0.17.0, the `tag` command did not return an error if it failed to
|
||||||
|
open or lock the repository. This has been fixed.
|
||||||
|
|
||||||
|
https://github.com/restic/restic/issues/5050
|
||||||
|
https://github.com/restic/restic/pull/5056
|
|
@ -110,7 +110,7 @@ func runTag(ctx context.Context, opts TagOptions, gopts GlobalOptions, args []st
|
||||||
Verbosef("create exclusive lock for repository\n")
|
Verbosef("create exclusive lock for repository\n")
|
||||||
ctx, repo, unlock, err := openWithExclusiveLock(ctx, gopts, false)
|
ctx, repo, unlock, err := openWithExclusiveLock(ctx, gopts, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
defer unlock()
|
defer unlock()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue