summaryrefslogtreecommitdiffstats
path: root/XMonad/Core.hs
diff options
context:
space:
mode:
authorJens Petersen <juhp@community.haskell.org>2011-04-26 08:23:41 +0200
committerJens Petersen <juhp@community.haskell.org>2011-04-26 08:23:41 +0200
commit922898fe9b64766537a6d35e19e4d8c5f6bffbda (patch)
tree6e6d8c889bb0b131331fcd04f90182cafadb539f /XMonad/Core.hs
parent59baa2f45aedc036b462ac1981a7c3591e9aa427 (diff)
downloadmetatile-922898fe9b64766537a6d35e19e4d8c5f6bffbda.tar
metatile-922898fe9b64766537a6d35e19e4d8c5f6bffbda.zip
output error code when xmonad.hs compile fails without any error output
Ignore-this: 6249588a9d427a49fceb99d78a95c438 Currently if there is no ghc on the path say for some reason, xmonad.error is empty. This patch makes it output the exitcode code when the compile process fails without any error output. (It might be easier just to spawn a shell to get "ghc: command not found" output for free.) darcs-hash:20110426062341-2376b-eb9466e5933a53138d24b3492260a618c239acd3
Diffstat (limited to 'XMonad/Core.hs')
-rw-r--r--XMonad/Core.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs
index ba12455..8ec0000 100644
--- a/XMonad/Core.hs
+++ b/XMonad/Core.hs
@@ -464,7 +464,7 @@ recompile force = io $ do
ghcErr <- readFile err
let msg = unlines $
["Error detected while loading xmonad configuration file: " ++ src]
- ++ lines ghcErr ++ ["","Please check the file for errors."]
+ ++ lines (if (null ghcErr) then show status else ghcErr) ++ ["","Please check the file for errors."]
-- nb, the ordering of printing, then forking, is crucial due to
-- lazy evaluation
hPutStrLn stderr msg