2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-30 07:30:50 +00:00

Use global context in cmd_forget, like all other cmds

This commit is contained in:
Pauline Middelink 2017-05-04 16:35:35 +02:00
parent db6541b24c
commit 02eafe94b3

View File

@ -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 {