Skip to content

Commit 5f1bedd

Browse files
olaservoclaude
andauthored
fix: add shell:true for Windows compatibility in all-scenarios.test (#82)
spawn('npx', ...) fails on Windows because npx is actually npx.cmd. Adding shell: true only on Windows fixes this while preserving Unix signal handling behavior. 🦉 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]>
1 parent 976a8f6 commit 5f1bedd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/scenarios/server/all-scenarios.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ describe('Server Scenarios', () => {
1515
'examples/servers/typescript/everything-server.ts'
1616
);
1717

18+
// Use shell: true on Windows only (npx is npx.cmd on Windows)
19+
const isWindows = process.platform === 'win32';
1820
serverProcess = spawn('npx', ['tsx', serverPath], {
1921
env: { ...process.env, PORT: TEST_PORT.toString() },
2022
stdio: ['ignore', 'pipe', 'pipe'],
21-
detached: false
23+
detached: false,
24+
shell: isWindows
2225
});
2326

2427
// Capture output for debugging

0 commit comments

Comments
 (0)