Skip to content

Commit 9777eae

Browse files
committed
Ensure windows quotes server arguments, to work correctly in paths with spaces
1 parent 6389bb0 commit 9777eae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ async function startServer(retries = 2) {
170170
server = spawn(serverBinPath, ['start'], {
171171
windowsHide: true,
172172
stdio: ['inherit', 'pipe', 'pipe'],
173-
shell: isWindows,
174-
detached: !isWindows
173+
shell: isWindows, // Required to spawn a .cmd script
174+
windowsVerbatimArguments: false, // Fixes quoting in windows shells
175+
detached: !isWindows // Detach on Linux, so we can cleanly kill as a group
175176
});
176177

177178
server.stdout.pipe(process.stdout);

0 commit comments

Comments
 (0)