[commit: ghc] master: Fix clean so it works on Windows (#679) (9a6f41c)
git at git.haskell.org
git at git.haskell.org
Tue Oct 23 20:20:13 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9a6f41ced3c9db625f1485029c3256dc7d9c93d8/ghc
>---------------------------------------------------------------
commit 9a6f41ced3c9db625f1485029c3256dc7d9c93d8
Author: Neil Mitchell <ndmitchell at gmail.com>
Date: Fri Sep 7 20:41:48 2018 +0100
Fix clean so it works on Windows (#679)
>---------------------------------------------------------------
9a6f41ced3c9db625f1485029c3256dc7d9c93d8
src/Rules/Clean.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Rules/Clean.hs b/src/Rules/Clean.hs
index 629d9a1..abf6933 100644
--- a/src/Rules/Clean.hs
+++ b/src/Rules/Clean.hs
@@ -1,5 +1,6 @@
module Rules.Clean (clean, cleanSourceTree, cleanRules) where
+import qualified System.Directory as IO
import Base
clean :: Action ()
@@ -7,7 +8,8 @@ clean = do
putBuild "| Removing Hadrian files..."
cleanSourceTree
path <- buildRoot
- removeDirectory path
+ putBuild $ "| Remove directory " ++ path ++ " (after build completes)"
+ runAfter $ IO.removeDirectoryRecursive path -- since we can't delete the Shake database while Shake is running
putSuccess "| Done. "
cleanSourceTree :: Action ()
More information about the ghc-commits
mailing list