nukes another 15 lines thanks to ifM

This commit is contained in:
Joey Hess 2012-03-15 20:39:25 -04:00
parent ff8b6c1bab
commit c0c9991c9f
6 changed files with 57 additions and 74 deletions

View file

@ -89,13 +89,13 @@ runHook hooktype hook k f a = maybe (return False) run =<< lookupHook hooktype h
where
run command = do
showOutput -- make way for hook output
res <- liftIO $ boolSystemEnv
"sh" [Param "-c", Param command] $ hookEnv k f
if res
then a
else do
ifM (liftIO $ boolSystemEnv
"sh" [Param "-c", Param command] $ hookEnv k f)
( a
, do
warning $ hook ++ " hook exited nonzero!"
return res
return False
)
store :: String -> Key -> Annex Bool
store h k = do