summaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 18bb5fe51..d2adb71bb 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -71,7 +71,9 @@ tryRun' :: Integer -> Annex.AnnexState -> Command -> [CommandCleanup] -> IO ()
tryRun' errnum _ cmd []
| errnum > 0 = error $ cmdname cmd ++ ": " ++ show errnum ++ " failed"
| otherwise = return ()
-tryRun' errnum state cmd (a:as) = run >>= handle
+tryRun' errnum state cmd (a:as) = do
+ r <- run
+ handle $! r
where
run = tryIO $ Annex.run state $ do
Annex.Queue.flushWhenFull