sebastien 6 년 전
부모
커밋
63c907a76b
1개의 변경된 파일18개의 추가작업 그리고 4개의 파일을 삭제
  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;
+            }
+        } 
+    }
 };