aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
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
commit3dbd75e97362fdc262947bd55d247863ab2b3c5c (patch)
tree6e6d8c889bb0b131331fcd04f90182cafadb539f /XMonad
parentd4244e0ff967a61e5babb313aefe19259772e768 (diff)
downloadxmonad-3dbd75e97362fdc262947bd55d247863ab2b3c5c.tar.gz
xmonad-3dbd75e97362fdc262947bd55d247863ab2b3c5c.tar.xz
xmonad-3dbd75e97362fdc262947bd55d247863ab2b3c5c.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.gz
Diffstat (limited to 'XMonad')
-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