Commit ddeceef
committed
Fix isProcessAlive using require() in ESM — broke all Node.js Windows tests
The Windows process check used `require('child_process')` which doesn't
exist in Node.js ESM modules (only works in Bun which supports require
in ESM). This caused every isProcessAlive() call to throw, be caught,
and return false — making all bridge processes appear dead.
Cascading effects: sessions always showed "crashed", PIDs were null
(bridges got unnecessarily restarted), close couldn't send HTTP DELETE
(thought bridge was dead), and proxy stayed alive after close.
Fix: import execFileSync at module top level (ESM-compatible) and use
execFileSync instead of execSync (also avoids shell injection).
https://claude.ai/code/session_01QA2R1dDEWRrdGUAbX9Qz9B1 parent 8fc0fd9 commit ddeceef
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
335 | | - | |
336 | | - | |
337 | | - | |
| 336 | + | |
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
| |||
0 commit comments