Skip to content

Commit

Permalink
fix: use shell when spawning .bat or .cmd files
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Jul 3, 2024
1 parent 3e8ebf7 commit 31bd299
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions/vscode-test-resolver/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ export function activate(context: vscode.ExtensionContext) {
const serverCommandPath = path.join(vscodePath, 'scripts', serverCommand);

outputChannel.appendLine(`Launching server: "${serverCommandPath}" ${commandArgs.join(' ')}`);

extHostProcess = cp.spawn(serverCommandPath, commandArgs, { env, cwd: vscodePath });
const shell = (process.platform === 'win32');
extHostProcess = cp.spawn(serverCommandPath, commandArgs, { env, cwd: vscodePath, shell });
} else {
const extensionToInstall = process.env['TESTRESOLVER_INSTALL_BUILTIN_EXTENSION'];
if (extensionToInstall) {
Expand All @@ -182,8 +182,8 @@ export function activate(context: vscode.ExtensionContext) {

outputChannel.appendLine(`Using server build at ${serverLocation}`);
outputChannel.appendLine(`Server arguments ${commandArgs.join(' ')}`);

extHostProcess = cp.spawn(path.join(serverLocation, 'bin', serverCommand), commandArgs, { env, cwd: serverLocation });
const shell = (process.platform === 'win32');
extHostProcess = cp.spawn(path.join(serverLocation, 'bin', serverCommand), commandArgs, { env, cwd: serverLocation, shell });
}
extHostProcess.stdout!.on('data', (data: Buffer) => processOutput(data.toString()));
extHostProcess.stderr!.on('data', (data: Buffer) => processOutput(data.toString()));
Expand Down

0 comments on commit 31bd299

Please sign in to comment.