workspace: prepare: ensure file creation

pull/541/head^2
undefined 2 years ago
parent 718e8e9e10
commit f01a8b6671
No known key found for this signature in database

@ -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 = [

@ -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',

Loading…
Cancel
Save