From 02eafe94b373ef5846dff65ead904d5f8a9dce3d Mon Sep 17 00:00:00 2001 From: Pauline Middelink Date: Thu, 4 May 2017 16:35:35 +0200 Subject: [PATCH] Use global context in cmd_forget, like all other cmds --- src/cmds/restic/cmd_forget.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmds/restic/cmd_forget.go b/src/cmds/restic/cmd_forget.go index 5e6caf6db..4885cf617 100644 --- a/src/cmds/restic/cmd_forget.go +++ b/src/cmds/restic/cmd_forget.go @@ -90,7 +90,7 @@ func runForget(opts ForgetOptions, gopts GlobalOptions, args []string) error { } snapshotGroups := make(map[string]restic.Snapshots) - ctx, cancel := context.WithCancel(context.Background()) + ctx, cancel := context.WithCancel(gopts.ctx) defer cancel() for sn := range FindFilteredSnapshots(ctx, repo, opts.Host, opts.Tags, opts.Paths, args) { if len(args) > 0 {