mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
修复一处奇特的错误
This commit is contained in:
1 parent
50952050f8
commit
84ae0b7791
2 files changed
+8
-8
No files matched your search
+6
-6
@@ -62,12 +62,12 @@ for (const package of packages) {
|
|||||||
fs.writeFileSync(path.resolve(process.cwd(), 'tsconfig.json'), JSON.stringify(config));
|
fs.writeFileSync(path.resolve(process.cwd(), 'tsconfig.json'), JSON.stringify(config));
|
||||||
|
|
||||||
if (argv.watch) {
|
if (argv.watch) {
|
||||||
child.spawnSync('../node_modules/.bin/tsc -b --watch', { stdio: 'inherit' });
|
child.execSync('./node_modules/.bin/tsc -b --watch', { stdio: 'inherit' });
|
||||||
} else {
|
} else {
|
||||||
let result = child.spawnSync('../node_modules/.bin/tsc -b', { stdio: 'inherit' });
|
let result;
|
||||||
if (result.status != 0) {
|
try {
|
||||||
result = child.spawnSync('../node_modules/.bin/tsc -b', { stdio: 'inherit' });
|
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);
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// Hydro Integration
|
// Hydro Integration
|
||||||
/* eslint-disable no-await-in-loop */
|
/* eslint-disable no-await-in-loop */
|
||||||
import { } from 'hydrooj';
|
import 'hydrooj';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import cluster from 'cluster';
|
import cluster from 'cluster';
|
||||||
import child from 'child_process';
|
import child from 'child_process';
|
||||||
@@ -8,7 +8,7 @@ import { ObjectID } from 'bson';
|
|||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import { homedir, tmpdir } from 'os';
|
import { homedir, tmpdir } from 'os';
|
||||||
|
|
||||||
declare module 'hydrooj' {
|
declare module 'hydrooj/dist/interface' {
|
||||||
interface SystemKeys {
|
interface SystemKeys {
|
||||||
'hydrojudge.langs': string,
|
'hydrojudge.langs': string,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user