summaryrefslogtreecommitdiff
path: root/git-annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-25 19:17:11 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-25 19:17:11 -0400
commite87287c11b81ea6f339628bcbebfb239d0ccadd0 (patch)
tree7ee01405715834e473b9874b9eeb87968d5d0d65 /git-annex.hs
parent47892ced883b96c3a9c2903aa8a59b3b8a2f1731 (diff)
fix failure propigation
Diffstat (limited to 'git-annex.hs')
-rw-r--r--git-annex.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-annex.hs b/git-annex.hs
index 602f672c5..d7b26cd96 100644
--- a/git-annex.hs
+++ b/git-annex.hs
@@ -27,7 +27,7 @@ main = do
- or more likely I missed an easy way to do it. So, I have to laboriously
- thread AnnexState through this function.
-}
-tryRun :: AnnexState -> [Annex ()] -> IO ()
+tryRun :: AnnexState -> [Annex Bool] -> IO ()
tryRun state actions = tryRun' state 0 actions
tryRun' state errnum (a:as) = do
result <- try $ Annex.run state a
@@ -35,7 +35,8 @@ tryRun' state errnum (a:as) = do
Left err -> do
showErr err
tryRun' state (errnum + 1) as
- Right (_,state') -> tryRun' state' errnum as
+ Right (True,state') -> tryRun' state' errnum as
+ Right (False,state') -> tryRun' state' (errnum + 1) as
tryRun' state errnum [] = do
if (errnum > 0)
then error $ (show errnum) ++ " failed"