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

git at git.haskell.org git at git.haskell.org
Thu Jul 27 20:50:53 UTC 2017


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

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

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

commit c1aabd5dbd902ed848b7c00c5e8927e3006f8314
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.


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

c1aabd5dbd902ed848b7c00c5e8927e3006f8314
 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