Skip to content

Commit 485fe1d

Browse files
fix: skip detached spawn on Windows to prevent stdio hang
detached: true on Windows opens a new console window, breaking stdio piping so the test never receives the JSON URL from stderr. Only use detached on Unix where it creates a process group for kill(-pid). Windows already uses taskkill /t /f for tree cleanup. Made-with: Cursor
1 parent dadfd55 commit 485fe1d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/commands/webapp/helpers/devServerUtils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ export function spawnWebappDev(args: string[], options: { cwd: string; timeout?:
4444
{
4545
cwd: options.cwd,
4646
stdio: ['pipe', 'pipe', 'pipe'],
47-
detached: true,
47+
// Unix: detached creates a process group so we can kill(-pid) the tree.
48+
// Windows: detached opens a new console and breaks stdio piping; skip it
49+
// since taskkill /t /f already handles tree cleanup.
50+
...(process.platform !== 'win32' && { detached: true }),
4851
}
4952
);
5053

0 commit comments

Comments
 (0)