From f01a8b66712497d28e740d111e90f35b026ea43f Mon Sep 17 00:00:00 2001 From: undefined Date: Wed, 22 Mar 2023 17:43:25 +0800 Subject: [PATCH] workspace: prepare: ensure file creation --- build/prepare.js | 4 ++-- install/install.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/prepare.js b/build/prepare.js index ef06846f..3b30b4e5 100644 --- a/build/prepare.js +++ b/build/prepare.js @@ -61,9 +61,9 @@ const configFlat = (name) => ({ for (const name of ['plugins', 'modules']) { if (!fs.existsSync(path.resolve(process.cwd(), name))) { fs.mkdirSync(path.resolve(process.cwd(), name)); - // Write an empty file to make eslint happy - fs.writeFileSync(path.resolve(process.cwd(), name, 'nop.ts'), 'export default {};\n'); } + // Write an empty file to make eslint happy + fs.writeFileSync(path.resolve(process.cwd(), name, 'nop.ts'), 'export default {};\n'); } const modules = [ diff --git a/install/install.ts b/install/install.ts index 49f7f777..f7d6c72b 100644 --- a/install/install.ts +++ b/install/install.ts @@ -446,7 +446,7 @@ ${nixConfBase}`); domainId: 'system', }; console.log(config); - exec(`hydrooj cli script migrateHustoj '${JSON.stringify(config)}'`); + exec(`hydrooj cli script migrateHustoj '${JSON.stringify(config)}'`, { stdio: 'inherit' }); if (!getConfig('OJ_REGISTER')) exec('hydrooj cli user setPriv 0 0'); }, 'pm2 restart hydrooj',