From 94924123bb2bc615f09e15dd69c4f690f7a7cfd5 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Wed, 7 Nov 2007 01:53:09 +0000 Subject: [PATCH] fall back to previous ~/.xmonad/xmonad if recompilation fails --- Main.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Main.hs b/Main.hs index 51b5216..40578f6 100644 --- a/Main.hs +++ b/Main.hs @@ -22,7 +22,6 @@ import System.IO import System.Process import System.Directory import System.Environment -import System.Exit import System.Posix.Process (executeFile) -- | The entry point into xmonad. Attempts to compile any custom main @@ -47,7 +46,7 @@ buildLaunch = do dir <- fmap (++ "/.xmonad") getHomeDirectory pid <- runProcess "ghc" ["--make", "xmonad.hs"] (Just dir) Nothing Nothing Nothing Nothing - ExitSuccess <- waitForProcess pid + waitForProcess pid args <- getArgs executeFile (dir ++ "/xmonad") False args Nothing return ()