fix handling of nonexistant hook
This commit is contained in:
parent
cf8788fb49
commit
04b77328ef
1 changed files with 2 additions and 1 deletions
|
@ -65,6 +65,7 @@ runAnnexHook hook = do
|
||||||
when exists $
|
when exists $
|
||||||
run cmd
|
run cmd
|
||||||
where
|
where
|
||||||
hookexists f = liftIO $ isExecutable . fileMode <$> getFileStatus f
|
hookexists f = liftIO $ catchBoolIO $
|
||||||
|
isExecutable . fileMode <$> getFileStatus f
|
||||||
run cmd = unlessM (liftIO $ boolSystem cmd []) $
|
run cmd = unlessM (liftIO $ boolSystem cmd []) $
|
||||||
warning $ cmd ++ " failed"
|
warning $ cmd ++ " failed"
|
||||||
|
|
Loading…
Reference in a new issue