From cb85fd18675e53b8e6035afe869c5479c9d72326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sat, 7 Jul 2018 17:01:05 +0800 Subject: [PATCH] bugfix: Determine if temp exists --- scripts/mergeLessPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mergeLessPlugin.js b/scripts/mergeLessPlugin.js index 2a7accdc..2e27f372 100755 --- a/scripts/mergeLessPlugin.js +++ b/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(() => { -- GitLab