mirror of
https://github.com/restic/restic.git
synced 2026-10-21 00:18:12 +00:00
repository: Push all usage of errors.Fatal out of the package
As the `Fatal` error type only includes a string, it becomes impossible to inspect the contained error. This is for a example a problem for the fuse implementation, which must be able to detect context.Canceled errors. Co-authored-by: greatroar <61184462+greatroar@users.noreply.github.com>
This commit is contained in:
1 parent
a013014c24
commit
5773b86d02
7 files changed
+18
-14
No files matched your search
@@ -29,7 +29,7 @@ func Repack(ctx context.Context, repo restic.Repository, dstRepo restic.Reposito
|
||||
debug.Log("repacking %d packs while keeping %d blobs", len(packs), keepBlobs.Len())
|
||||
|
||||
if repo == dstRepo && dstRepo.Connections() < 2 {
|
||||
return nil, errors.Fatal("repack step requires a backend connection limit of at least two")
|
||||
return nil, errors.New("repack step requires a backend connection limit of at least two")
|
||||
}
|
||||
|
||||
wg, wgCtx := errgroup.WithContext(ctx)
|
||||
|
||||
Reference in new issue
Block a user