修复一处奇特的错误

This commit is contained in:
undefined committed 2020-09-17 23:42:43 +08:00
1 parent 50952050f8
commit 84ae0b7791
2 files changed
+8 -8

No files matched your search

+6 -6
View File
@@ -62,12 +62,12 @@ for (const package of packages) {
fs.writeFileSync(path.resolve(process.cwd(), 'tsconfig.json'), JSON.stringify(config));
if (argv.watch) {
child.spawnSync('../node_modules/.bin/tsc -b --watch', { stdio: 'inherit' });
child.execSync('./node_modules/.bin/tsc -b --watch', { stdio: 'inherit' });
} else {
let result = child.spawnSync('../node_modules/.bin/tsc -b', { stdio: 'inherit' });
if (result.status != 0) {
result = child.spawnSync('../node_modules/.bin/tsc -b', { stdio: 'inherit' });
let result;
try {
result = child.execSync('./node_modules/.bin/tsc -b', { stdio: 'inherit' });
} catch (e) {
result = child.execSync('./node_modules/.bin/tsc -b', { stdio: 'inherit' });
}
console.log(result);
process.exit(result.status);
}
+2 -2
View File
@@ -1,6 +1,6 @@
// Hydro Integration
/* eslint-disable no-await-in-loop */
import { } from 'hydrooj';
import 'hydrooj';
import path from 'path';
import cluster from 'cluster';
import child from 'child_process';
@@ -8,7 +8,7 @@ import { ObjectID } from 'bson';
import fs from 'fs-extra';
import { homedir, tmpdir } from 'os';
declare module 'hydrooj' {
declare module 'hydrooj/dist/interface' {
interface SystemKeys {
'hydrojudge.langs': string,
}