mirror of
https://github.com/Microsoft/vscode
synced 2024-06-30 23:04:56 +00:00
fix: use shell when spawning .bat or .cmd files
Refs https://github.com/nodejs/node/commit/6627222409
This commit is contained in:
parent
446f1c861e
commit
9352fa265c
|
@ -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) {
|
||||
|
@ -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()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user