Expose IExtHostTerminalService.getDefaultShellArgs internally

Fixes #88280
This commit is contained in:
Daniel Imms
2020-01-13 07:45:08 -08:00
parent 76c72ffc94
commit a62805844e
2 changed files with 9 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
);
}
private _getDefaultShellArgs(useAutomationShell: boolean, configProvider: ExtHostConfigProvider): string[] | string {
public getDefaultShellArgs(useAutomationShell: boolean, configProvider: ExtHostConfigProvider): string[] | string {
const fetchSetting = (key: string): { userValue: string | string[] | undefined, value: string | string[] | undefined, defaultValue: string | string[] | undefined } => {
const setting = configProvider
.getConfiguration(key.substr(0, key.lastIndexOf('.')))
@@ -137,7 +137,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
const configProvider = await this._extHostConfiguration.getConfigProvider();
if (!shellLaunchConfig.executable) {
shellLaunchConfig.executable = this.getDefaultShell(false, configProvider);
shellLaunchConfig.args = this._getDefaultShellArgs(false, configProvider);
shellLaunchConfig.args = this.getDefaultShellArgs(false, configProvider);
} else {
if (this._variableResolver) {
shellLaunchConfig.executable = this._variableResolver.resolve(this._lastActiveWorkspace, shellLaunchConfig.executable);
@@ -208,7 +208,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
const configProvider = await this._extHostConfiguration.getConfigProvider();
return Promise.resolve({
shell: this.getDefaultShell(useAutomationShell, configProvider),
args: this._getDefaultShellArgs(useAutomationShell, configProvider)
args: this.getDefaultShellArgs(useAutomationShell, configProvider)
});
}