fix handling of nonexistant hook

This commit is contained in:
Joey Hess 2014-03-03 13:59:36 -04:00
parent cf8788fb49
commit 04b77328ef
Failed to extract signature

View file

@ -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"