summaryrefslogtreecommitdiff
path: root/src/Propellor/Message.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-26 10:51:29 -0400
committerJoey Hess2014-11-26 10:51:29 -0400
commit5a104675e4e18812f8794d9631d54c91b6d9be12 (patch)
tree32018d5901b9ed29adfe39f3c7635398e659d900 /src/Propellor/Message.hs
parente07dc9b1d336e86ce51b2a94fcfa943cc1650afd (diff)
avoid crash on no propellor.debug setting
Diffstat (limited to 'src/Propellor/Message.hs')
-rw-r--r--src/Propellor/Message.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Propellor/Message.hs b/src/Propellor/Message.hs
index 49dc4934..bcd99649 100644
--- a/src/Propellor/Message.hs
+++ b/src/Propellor/Message.hs
@@ -18,6 +18,7 @@ import Propellor.Types
import Utility.Monad
import Utility.Env
import Utility.Process
+import Utility.Exception
data MessageHandle
= ConsoleMessageHandle
@@ -113,7 +114,8 @@ checkDebugMode = go =<< getEnv "PROPELLOR_DEBUG"
go Nothing = whenM (doesDirectoryExist ".git") $
whenM (any (== "1") . lines <$> getgitconfig) $
enableDebugMode
- getgitconfig = readProcess "git" ["config", "propellor.debug"]
+ getgitconfig = catchDefaultIO "" $
+ readProcess "git" ["config", "propellor.debug"]
enableDebugMode :: IO ()
enableDebugMode = do