Files
8200d06872 [dev-tool] Log real tsc failure detail instead of [object Object] (#39240)
## Summary

`runTypeScript` in
`common/tools/dev-tool/src/commands/run/build-test.ts` logged the whole
`SpawnSyncReturns` object on failure via `log.error(..., res)`, which
rendered uselessly as `[object Object]`.

## Fix

Since `tsc` runs with `stdio: "inherit"`, its diagnostics are already
printed to the log. So instead of dumping the object, the failure branch
now logs the actual exit code or signal. It also handles the spawn-error
case (`res.error`) — e.g. when `tsc` can't be spawned, `status`/`signal`
are `null` so the previous check missed it entirely.

## Verification

From `common/tools/dev-tool`, `npx tsc -p . --noEmit` passes (exit code
0).

Small standalone follow-up to the dev-tool logging improvements in
#39238.

---------

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
2026-07-15 14:56:12 -07:00
..