1234567891011121314151617181920212223242526 |
- var fs = require("fs-extra");
- var rmDir = function(dirPath) {
- fs.removeSync(dirPath);
- }
- module.exports = function(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;
- }
- }
- }
- };
|