From fa7614b6882d774d91f3ffa17dbab13b120bcad2 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 23 Nov 2007 09:22:19 +0000 Subject: [PATCH] FIX BUILD: maybeUpdateFile: ignore failures when removing the target --- Setup.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Setup.hs b/Setup.hs index e8f73b6..9575aa0 100644 --- 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 -- 1.7.10.4