From 69e1ee3fde8530361ce4c0569f4ec2175f2d86a7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 8 Aug 2014 19:18:08 -0400 Subject: fix checkPresent error handling for non-present local git repos guardUsable r (error "foo") *returned* an error, rather than throwing it --- Remote/Helper/Git.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Remote/Helper') 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 -- cgit v1.2.3