mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-31 04:01:52 -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
|
||||
when yes $ do
|
||||
srcT <- getModificationTime src
|
||||
binT <- getModificationTime bin
|
||||
when (srcT > binT) $ do
|
||||
binT <- catch (getModificationTime bin) (const $ return srcT) -- needs recompiling
|
||||
when (srcT >= binT) $ do
|
||||
status <- bracket (openFile err WriteMode) hClose $ \h -> do
|
||||
waitForProcess =<< runProcess "ghc" ["--make", "xmonad.hs", "-i", "-v0"] (Just dir)
|
||||
Nothing Nothing Nothing (Just h)
|
||||
|
Reference in New Issue
Block a user