修复一处奇特的错误

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);
}