mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-05 06:31:54 -07:00
handle case of xmonad binary not existing, when checking recompilation
This commit is contained in:
@@ -312,8 +312,8 @@ recompile = do
|
|||||||
yes <- doesFileExist src
|
yes <- doesFileExist src
|
||||||
when yes $ do
|
when yes $ do
|
||||||
srcT <- getModificationTime src
|
srcT <- getModificationTime src
|
||||||
binT <- getModificationTime bin
|
binT <- catch (getModificationTime bin) (const $ return srcT) -- needs recompiling
|
||||||
when (srcT > binT) $ do
|
when (srcT >= binT) $ do
|
||||||
status <- bracket (openFile err WriteMode) hClose $ \h -> do
|
status <- bracket (openFile err WriteMode) hClose $ \h -> do
|
||||||
waitForProcess =<< runProcess "ghc" ["--make", "xmonad.hs", "-i", "-v0"] (Just dir)
|
waitForProcess =<< runProcess "ghc" ["--make", "xmonad.hs", "-i", "-v0"] (Just dir)
|
||||||
Nothing Nothing Nothing (Just h)
|
Nothing Nothing Nothing (Just h)
|
||||||
|
Reference in New Issue
Block a user