move to IProcessEnvService where appropriate in default shell logic (#118271)

* move to IProcessEnvService where appropriate

* change distro
This commit is contained in:
Tyler James Leonhardt
2021-03-08 19:46:34 -08:00
committed by GitHub
parent ac229ced07
commit 27975dad4f
6 changed files with 17 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
// Getting the SystemShell is an async operation, however, the ExtHost terminal service is mostly synchronous
// and the API `vscode.env.shell` is also synchronous. The default shell _should_ be set when extensions are
// starting up but if not, we run getSystemShellSync below which gets a sane default.
getSystemShell(platform.platform).then(s => this._defaultShell = s);
getSystemShell(platform.platform, process.env as platform.IProcessEnvironment).then(s => this._defaultShell = s);
this._updateLastActiveWorkspace();
this._updateVariableResolver();
@@ -83,7 +83,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
return terminalEnvironment.getDefaultShell(
fetchSetting,
this._isWorkspaceShellAllowed,
this._defaultShell ?? getSystemShellSync(platform.platform),
this._defaultShell ?? getSystemShellSync(platform.platform, process.env as platform.IProcessEnvironment),
process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432'),
process.env.windir,
terminalEnvironment.createVariableResolver(this._lastActiveWorkspace, this._variableResolver),