projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bff1d3
)
FIX BUILD: maybeUpdateFile: ignore failures when removing the target
author
Simon Marlow
<simonmar@microsoft.com>
Fri, 23 Nov 2007 09:22:19 +0000
(09:22 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Fri, 23 Nov 2007 09:22:19 +0000
(09:22 +0000)
Setup.hs
patch
|
blob
|
history
diff --git
a/Setup.hs
b/Setup.hs
index
e8f73b6
..
9575aa0
100644
(file)
--- a/
Setup.hs
+++ b/
Setup.hs
@@
-15,6
+15,7
@@
import System.Cmd
import System.FilePath
import System.Exit
import System.Directory
+import Control.Exception (try)
main :: IO ()
main = do let hooks = defaultUserHooks {
@@
-59,7
+60,7
@@
maybeUpdateFile source target = do
r <- rawSystem "cmp" ["-s" {-quiet-}, source, target]
case r of
ExitSuccess -> removeFile source
- ExitFailure _ -> do removeFile target; renameFile source target
+ ExitFailure _ -> do try (removeFile target); renameFile source target
filter_modules_hook :: Hook a -> Hook a