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 <noreply@anthropic.com>
This commit is contained in:
parent
976a8f6ce2
commit
5f1bedd54b
1 changed files with 4 additions and 1 deletions
|
|
@ -15,10 +15,13 @@ describe('Server Scenarios', () => {
|
|||
'examples/servers/typescript/everything-server.ts'
|
||||
);
|
||||
|
||||
// Use shell: true on Windows only (npx is npx.cmd on Windows)
|
||||
const isWindows = process.platform === 'win32';
|
||||
serverProcess = spawn('npx', ['tsx', serverPath], {
|
||||
env: { ...process.env, PORT: TEST_PORT.toString() },
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
detached: false
|
||||
detached: false,
|
||||
shell: isWindows
|
||||
});
|
||||
|
||||
// Capture output for debugging
|
||||
|
|
|
|||
Loading…
Reference in a new issue