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:
Michael Eischer
2023-05-13 22:43:42 +02:00
parent a013014c24
commit 5773b86d02
7 changed files with 18 additions and 14 deletions

View File

@@ -456,7 +456,7 @@ func OpenRepository(ctx context.Context, opts GlobalOptions) (*repository.Reposi
PackSize: opts.PackSize * 1024 * 1024,
})
if err != nil {
return nil, err
return nil, errors.Fatal(err.Error())
}
passwordTriesLeft := 1