未验证 提交 5e2f9635 编写于 作者: M Megan Rogge 提交者: GitHub

Fix keys used to resolve terminal settings (#132868)

Co-authored-by: NIllusionMH <illusionmh@gmail.com>
上级 20e76480
......@@ -209,7 +209,7 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro
}
private _getUnresolvedRealDefaultProfile(os: OperatingSystem): ITerminalProfile | undefined {
const defaultProfileName = this._configurationService.getValue(`${TerminalSettingPrefix.DefaultProfile}.${this._getOsKey(os)}`);
const defaultProfileName = this._configurationService.getValue(`${TerminalSettingPrefix.DefaultProfile}${this._getOsKey(os)}`);
if (defaultProfileName && typeof defaultProfileName === 'string') {
return this._terminalService.availableProfiles.find(e => e.profileName === defaultProfileName);
}
......@@ -217,9 +217,9 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro
}
private async _getUnresolvedShellSettingDefaultProfile(options: IShellLaunchConfigResolveOptions): Promise<ITerminalProfile | undefined> {
let executable = this._configurationService.getValue<string>(`${TerminalSettingPrefix.Shell}.${this._getOsKey(options.os)}`);
let executable = this._configurationService.getValue<string>(`${TerminalSettingPrefix.Shell}${this._getOsKey(options.os)}`);
if (!this._isValidShell(executable)) {
const shellArgs = this._configurationService.inspect(`${TerminalSettingPrefix.ShellArgs}.${this._getOsKey(options.os)}`);
const shellArgs = this._configurationService.inspect(`${TerminalSettingPrefix.ShellArgs}${this._getOsKey(options.os)}`);
// && !this.getSafeConfigValue('shellArgs', options.os, false)) {
if (!shellArgs.userValue && !shellArgs.workspaceValue) {
return undefined;
......@@ -231,7 +231,7 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro
}
let args: string | string[] | undefined;
const shellArgsSetting = this._configurationService.getValue(`${TerminalSettingPrefix.ShellArgs}.${this._getOsKey(options.os)}`);
const shellArgsSetting = this._configurationService.getValue(`${TerminalSettingPrefix.ShellArgs}${this._getOsKey(options.os)}`);
if (this._isValidShellArgs(shellArgsSetting, options.os)) {
args = shellArgsSetting;
}
......
......@@ -326,7 +326,7 @@ export function getDefaultShellArgs(
}
const platformKey = platformOverride === Platform.Windows ? 'windows' : platformOverride === Platform.Mac ? 'osx' : 'linux';
let args = fetchSetting(<TerminalShellArgsSetting>`${TerminalSettingPrefix.ShellArgs}.${platformKey}`);
let args = fetchSetting(<TerminalShellArgsSetting>`${TerminalSettingPrefix.ShellArgs}${platformKey}`);
if (!args) {
return [];
}
......@@ -339,7 +339,7 @@ export function getDefaultShellArgs(
try {
resolvedArgs.push(variableResolver(arg));
} catch (e) {
logService.error(`Could not resolve ${TerminalSettingPrefix.ShellArgs}.${platformKey}`, e);
logService.error(`Could not resolve ${TerminalSettingPrefix.ShellArgs}${platformKey}`, e);
resolvedArgs.push(arg);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册