fix checkPresent error handling for non-present local git repos
guardUsable r (error "foo") *returned* an error, rather than throwing it
This commit is contained in:
parent
1dd3232e8e
commit
4f1ba9a23d
3 changed files with 18 additions and 17 deletions
|
@ -26,7 +26,7 @@ availabilityCalc r
|
|||
|
||||
{- Avoids performing an action on a local repository that's not usable.
|
||||
- Does not check that the repository is still available on disk. -}
|
||||
guardUsable :: Git.Repo -> a -> Annex a -> Annex a
|
||||
guardUsable r onerr a
|
||||
| Git.repoIsLocalUnknown r = return onerr
|
||||
guardUsable :: Git.Repo -> Annex a -> Annex a -> Annex a
|
||||
guardUsable r fallback a
|
||||
| Git.repoIsLocalUnknown r = fallback
|
||||
| otherwise = a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue