Remove process usage from terminalEnvironment

Fixes #75509
This commit is contained in:
Daniel Imms
2019-06-14 11:33:37 -07:00
parent 2935ccca97
commit 10d4256ff5
10 changed files with 57 additions and 25 deletions

View File

@@ -335,7 +335,13 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
.inspect<string | string[]>(key.substr(key.lastIndexOf('.') + 1));
return this._apiInspectConfigToPlain<string | string[]>(setting);
};
return terminalEnvironment.getDefaultShell(fetchSetting, this._isWorkspaceShellAllowed, getDefaultShell(platform.platform));
return terminalEnvironment.getDefaultShell(
fetchSetting,
this._isWorkspaceShellAllowed,
getDefaultShell(platform.platform),
process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'),
process.env.windir
);
}
public async resolveTerminalRenderer(id: number): Promise<vscode.TerminalRenderer> {
@@ -485,7 +491,14 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
.inspect<string | string[]>(key.substr(key.lastIndexOf('.') + 1));
return this._apiInspectConfigToPlain<string | string[]>(setting);
};
terminalEnvironment.mergeDefaultShellPathAndArgs(shellLaunchConfig, fetchSetting, isWorkspaceShellAllowed || false, getDefaultShell(platform.platform));
terminalEnvironment.mergeDefaultShellPathAndArgs(
shellLaunchConfig,
fetchSetting,
isWorkspaceShellAllowed || false,
getDefaultShell(platform.platform),
process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'),
process.env.windir
);
}
// Get the initial cwd