nukes another 15 lines thanks to ifM
This commit is contained in:
parent
ff8b6c1bab
commit
c0c9991c9f
6 changed files with 57 additions and 74 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue