Przeglądaj źródła

bugfix: Determine if temp exists

陈帅 7 lat temu
rodzic
commit
cb85fd1867
1 zmienionych plików z 1 dodań i 1 usunięć
  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(() => {