sebastien vor 6 Jahren
Ursprung
Commit
63c907a76b
1 geänderte Dateien mit 18 neuen und 4 gelöschten Zeilen
  1. 18 4
      Tools/Gulp/helpers/gulp-rmDir.js

+ 18 - 4
Tools/Gulp/helpers/gulp-rmDir.js

@@ -24,8 +24,22 @@ var rmDir = function(dirPath) {
 }
 
 module.exports = function(dirPath) {
-    // Retry :-)
-    rmDir(dirPath);
-    rmDir(dirPath);
-    rmDir(dirPath);
+    // Retry cause  sometimes locked on my mac :-)
+    try {
+        rmDir(dirPath);
+    }
+    catch (e) {
+        try {
+            rmDir(dirPath);
+        }
+        catch (e) {
+            try {
+                rmDir(dirPath);
+            }
+            catch (e) {
+                // Something is definitely wrong here.
+                throw e;
+            }
+        } 
+    }
 };