mirror of
https://github.com/octoleo/restic.git
synced 2024-11-02 11:46:36 +00:00
Use global context in cmd_forget, like all other cmds
This commit is contained in:
parent
db6541b24c
commit
02eafe94b3
@ -90,7 +90,7 @@ func runForget(opts ForgetOptions, gopts GlobalOptions, args []string) error {
|
|||||||
}
|
}
|
||||||
snapshotGroups := make(map[string]restic.Snapshots)
|
snapshotGroups := make(map[string]restic.Snapshots)
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(gopts.ctx)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
for sn := range FindFilteredSnapshots(ctx, repo, opts.Host, opts.Tags, opts.Paths, args) {
|
for sn := range FindFilteredSnapshots(ctx, repo, opts.Host, opts.Tags, opts.Paths, args) {
|
||||||
if len(args) > 0 {
|
if len(args) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user