mirror of
https://github.com/restic/restic.git
synced 2026-10-12 21:17:12 +00:00
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:
1 parent
407843c5f9
commit
63e32c44c0
3 files changed
+24
-17
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user