fix(scripts): merge tsc stdout+stderr before parsing typecheck output

tsc writes diagnostics to stdout; preferring one stream could drop the real errors when stderr carries unrelated noise. Concatenate both streams before filtering/parsing.
This commit is contained in:
Gauvino
2026-06-29 15:36:56 +02:00
parent 881e71ce1a
commit 1f8eb31b9b

View File

@@ -187,7 +187,9 @@ function runTypeCheck(): { ok: boolean } {
return { ok: true };
} catch (error) {
const execError = error as { stderr?: string; stdout?: string };
const errorOutput = execError.stderr || execError.stdout;
const errorOutput = [execError.stdout, execError.stderr]
.filter((chunk): chunk is string => Boolean(chunk))
.join("\n");
// No compiler output = tsc never ran (e.g. binary missing). Don't let a
// launch failure fall through to the "passed" branch and green-light CI.