Chore: housekeeping

This commit is contained in:
SukkaW
2023-10-16 22:52:08 +08:00
parent 36ef50cdbf
commit 697cea84ed
12 changed files with 227 additions and 291 deletions

View File

@@ -2,7 +2,7 @@ const { fetch } = require('undici');
const tar = require('tar');
const fs = require('fs');
const fsp = fs.promises;
const fse = require('fs-extra');
const { copy } = require('fs-extra');
const path = require('path');
const { tmpdir } = require('os');
const { Readable } = require('stream');
@@ -72,7 +72,7 @@ const downloadPreviousBuild = task(__filename, async () => {
await Promise.all(filesList.map(async p => {
const src = path.join(extractedPath, 'ruleset.skk.moe-master', p);
if (await fileExists(src)) {
return fse.copy(
return copy(
src,
path.join(__dirname, '..', p),
{ overwrite: true }