pass context to Find / FindSnapshot

This allows proper interruption of restic while it searches for
snapshots or key files.
This commit is contained in:
Michael Eischer
2020-10-09 22:37:56 +02:00
parent 5fd3dbccb7
commit c458e114d4
13 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ func runDump(opts DumpOptions, gopts GlobalOptions, args []string) error {
Exitf(1, "latest snapshot for criteria not found: %v Paths:%v Hosts:%v", err, opts.Paths, opts.Hosts)
}
} else {
id, err = restic.FindSnapshot(repo, snapshotIDString)
id, err = restic.FindSnapshot(ctx, repo, snapshotIDString)
if err != nil {
Exitf(1, "invalid id %q: %v", snapshotIDString, err)
}