diff options
Diffstat (limited to 'Remote/Helper/Hooks.hs')
-rw-r--r-- | Remote/Helper/Hooks.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Remote/Helper/Hooks.hs b/Remote/Helper/Hooks.hs index 5929b1793..ed329b914 100644 --- a/Remote/Helper/Hooks.hs +++ b/Remote/Helper/Hooks.hs @@ -84,10 +84,8 @@ runHooks r starthook stophook a = do liftIO $ closeFd fd lookupHook :: Remote -> String -> Annex (Maybe String) -lookupHook r n = do - command <- getConfig (repo r) hookname "" - if null command - then return Nothing - else return $ Just command +lookupHook r n = go =<< getConfig (repo r) hookname "" where + go "" = return Nothing + go command = return $ Just command hookname = n ++ "-command" |