Commit 87ddd5b6 authored by liguangyu06's avatar liguangyu06
Browse files

Run typecheck with the local TypeScript binary so Windows npx does not fetch dummy tsc.

parent 37bbde24
...@@ -296,8 +296,9 @@ async function main() { ...@@ -296,8 +296,9 @@ async function main() {
const singleShard = /^\d+\/\d+$/.test(opts.shard) ? opts.shard : ''; const singleShard = /^\d+\/\d+$/.test(opts.shard) ? opts.shard : '';
if (!opts.skipTypecheck) { if (!opts.skipTypecheck) {
const tscJs = path.join(ROOT, 'node_modules', 'typescript', 'bin', 'tsc');
console.log('[ci] typecheck: tsc --noEmit'); console.log('[ci] typecheck: tsc --noEmit');
const tsc = spawnSync('npx', ['tsc', '--noEmit'], { cwd: ROOT, stdio: 'inherit' }); const tsc = spawnSync(process.execPath, [tscJs, '--noEmit'], { cwd: ROOT, stdio: 'inherit' });
if (tsc.status !== 0) { if (tsc.status !== 0) {
const failSummary = { suite: suite.name, status: 'typecheck_failed', stamp, durationMs: Date.now() - startedAt }; const failSummary = { suite: suite.name, status: 'typecheck_failed', stamp, durationMs: Date.now() - startedAt };
writeFileSync(path.join(archiveDir, 'summary.json'), JSON.stringify(failSummary, null, 2)); writeFileSync(path.join(archiveDir, 'summary.json'), JSON.stringify(failSummary, null, 2));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment