Improve error reporting from restic diff

Instead of a stacktrace, restic diff 111 222 now reports:

	Fatal: no matching ID found for prefix "111"
This commit is contained in:
greatroar committed 2020-11-11 16:40:40 +01:00
1 parent 407843c5f9
commit 63e32c44c0
3 files changed
+24 -17

No files matched your search

+1 -2
View File
@@ -55,9 +55,8 @@ func init() {
func loadSnapshot(ctx context.Context, repo *repository.Repository, desc string) (*restic.Snapshot, error) {
id, err := restic.FindSnapshot(ctx, repo, desc)
if err != nil {
return nil, err
return nil, errors.Fatal(err.Error())
}
return restic.LoadSnapshot(ctx, repo, id)
}