summaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Command.hs b/Command.hs
index 13ea167bb..0dff0c862 100644
--- a/Command.hs
+++ b/Command.hs
@@ -65,9 +65,7 @@ stop = return Nothing
{- Stops unless a condition is met. -}
stopUnless :: Annex Bool -> Annex (Maybe a) -> Annex (Maybe a)
-stopUnless c a = do
- ok <- c
- if ok then a else stop
+stopUnless c a = ifM c ( a , stop )
{- Prepares to run a command via the check and seek stages, returning a
- list of actions to perform to run the command. -}