Преглед изворни кода

bugfix: Determine if temp exists

陈帅 пре 7 година
родитељ
комит
cb85fd1867
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      scripts/mergeLessPlugin.js

+ 1 - 1
scripts/mergeLessPlugin.js

@@ -59,7 +59,7 @@ class mergeLessPlugin {
       // covert less
       if (fs.existsSync(outFile)) {
         fs.unlinkSync(outFile);
-      } else {
+      } else if (!fs.existsSync(path.dirname(outFile))) {
         fs.mkdirSync(path.dirname(outFile));
       }
       loopAllLess(options.stylesDir).then(() => {