From 8d6edac6f48a4bf1522b68a30db579193c097e7a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 3 Mar 2014 13:59:36 -0400 Subject: fix handling of nonexistant hook --- Annex/Hook.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Annex') diff --git a/Annex/Hook.hs b/Annex/Hook.hs index a6fcf7131..4848e2d61 100644 --- a/Annex/Hook.hs +++ b/Annex/Hook.hs @@ -65,6 +65,7 @@ runAnnexHook hook = do when exists $ run cmd where - hookexists f = liftIO $ isExecutable . fileMode <$> getFileStatus f + hookexists f = liftIO $ catchBoolIO $ + isExecutable . fileMode <$> getFileStatus f run cmd = unlessM (liftIO $ boolSystem cmd []) $ warning $ cmd ++ " failed" -- cgit v1.2.3