diff options
author | Joey Hess <joey@kitenet.net> | 2014-08-08 19:18:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-08 19:18:08 -0400 |
commit | 69e1ee3fde8530361ce4c0569f4ec2175f2d86a7 (patch) | |
tree | b1ebfa6c35a83685b483665e6f4795eaae846432 /Remote/Helper | |
parent | 068b5f24417681425a3b0a8b706bfe19b89922ba (diff) |
fix checkPresent error handling for non-present local git repos
guardUsable r (error "foo") *returned* an error, rather than throwing it
Diffstat (limited to 'Remote/Helper')
-rw-r--r-- | Remote/Helper/Git.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Remote/Helper/Git.hs b/Remote/Helper/Git.hs index d76cb2ee7..b405fd358 100644 --- a/Remote/Helper/Git.hs +++ b/Remote/Helper/Git.hs @@ -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 |