summaryrefslogtreecommitdiff
path: root/CmdLine/Action.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CmdLine/Action.hs')
-rw-r--r--CmdLine/Action.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/CmdLine/Action.hs b/CmdLine/Action.hs
index b8d0e3a40..2e0bc2ba2 100644
--- a/CmdLine/Action.hs
+++ b/CmdLine/Action.hs
@@ -186,13 +186,11 @@ allowConcurrentOutput = id
onlyActionOn :: Key -> CommandStart -> CommandStart
onlyActionOn k a = onlyActionOn' k run
where
- run = do
- -- Run whole action, not just start stage, so other threads
- -- block until it's done.
- r <- callCommandAction' a
- case r of
- Nothing -> return Nothing
- Just r' -> return $ Just $ return $ Just $ return r'
+ -- Run whole action, not just start stage, so other threads
+ -- block until it's done.
+ run = callCommandAction' a >>= \case
+ Nothing -> return Nothing
+ Just r' -> return $ Just $ return $ Just $ return r'
onlyActionOn' :: Key -> Annex a -> Annex a
onlyActionOn' k a = go =<< Annex.getState Annex.concurrency