From b8702c0eeee0a32c11775af523c5e0ecb42fc5bc Mon Sep 17 00:00:00 2001 From: rnet Date: Wed, 10 Apr 2024 19:12:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8B=B7=E8=B4=9D=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/makeCodeHigh.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/makeCodeHigh.js b/src/makeCodeHigh.js index a7a3385..05c7f9e 100644 --- a/src/makeCodeHigh.js +++ b/src/makeCodeHigh.js @@ -93,7 +93,9 @@ function secondStep(ts, immucfg, mate) { } module.exports = async function (ts, immucfg, mate) { - fse.moveSync(paths.outputResolve('makecode-high'), paths.outputResolve('makecode-high-old'), { overwrite: true }); + if (fs.existsSync(paths.outputResolve('makecode-high'))) { + fse.moveSync(paths.outputResolve('makecode-high'), paths.outputResolve('makecode-high-old'), { overwrite: true }); + } const startTime = new Date().getTime(); const [files, cookieStr] = firstStep(ts, immucfg, mate); files.unshift('\n第1次请求:\n');