[commit: ghc] wip/jenkins: Don't use deleteDir (1cf836f)

git at git.haskell.org git at git.haskell.org
Wed Jun 28 01:40:28 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/jenkins
Link       : http://ghc.haskell.org/trac/ghc/changeset/1cf836f7ee75bd40a89eb9e3f3ef29dcde4b7f97/ghc

>---------------------------------------------------------------

commit 1cf836f7ee75bd40a89eb9e3f3ef29dcde4b7f97
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Jun 27 21:39:36 2017 -0400

    Don't use deleteDir
    
    I suspect it is the reason that builds have been mysteriously failing despite
    all steps succeeding.


>---------------------------------------------------------------

1cf836f7ee75bd40a89eb9e3f3ef29dcde4b7f97
 Jenkinsfile | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index fee5743..7f366d5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -229,12 +229,12 @@ def withTempDir(String name, Closure f) {
      rm -Rf ${name} || true
      mkdir ${name}
      """
-  dir(name) {
-    try {
+  try {
+    dir(name) {
       f()
-    } finally {
-      deleteDir()
     }
+  } finally {
+    sh "rm -Rf ${name}"
   }
 }
 
@@ -260,12 +260,12 @@ def withGhcBinDist(String targetTriple, Closure f) {
     def metadata = readJSON file: "bindist.json"
     sh "tar -xf ${metadata.tarName}"
     sh "tar -xf ghc-testsuite.tar.xz"
-    dir(metadata.dirName) {
-      try {
+    try {
+      dir(metadata.dirName) {
         f()
-      } finally {
-        deleteDir()
       }
+    } finally {
+      sh "rm -R ${metadata.dirName}"
     }
   }
 }



More information about the ghc-commits mailing list