mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-26 10:16:01 +01:00
fix #143638
This commit is contained in:
@@ -456,12 +456,15 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
|
||||
if (shellIntegration.enableShellIntegration) {
|
||||
shellLaunchConfig.args = shellIntegration.args;
|
||||
if (env?.['ZDOTDIR']) {
|
||||
shellLaunchConfig.env = shellLaunchConfig.env || {} as IProcessEnvironment;
|
||||
const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.file);
|
||||
const lastActiveWorkspaceRoot = activeWorkspaceRootUri ? withNullAsUndefined(this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri)) : undefined;
|
||||
const resolved = await this._configurationResolverService.resolveAsync(lastActiveWorkspaceRoot, env['ZDOTDIR']);
|
||||
env['ZDOTDIR'] = resolved;
|
||||
}
|
||||
if (env?.['VSCODE_SHELL_LOGIN'] && shellLaunchConfig.env?.['VSCODE_SHELL_LOGIN']) {
|
||||
this._logService.info('vscode shell login');
|
||||
shellLaunchConfig.env['VSCODE_SHELL_LOGIN'] = env?.['VSCODE_SHELL_LOGIN'];
|
||||
}
|
||||
// Always resolve the injected arguments on local processes
|
||||
await this._terminalProfileResolverService.resolveShellLaunchConfig(shellLaunchConfig, {
|
||||
remoteAuthority: undefined,
|
||||
|
||||
@@ -150,6 +150,8 @@ class LocalTerminalBackend extends BaseTerminalBackend implements ITerminalBacke
|
||||
shouldPersist: boolean
|
||||
): Promise<ITerminalChildProcess> {
|
||||
const executableEnv = await this._shellEnvironmentService.getShellEnv();
|
||||
executableEnv['VSCODE_SHELL_LOGIN'] = env['VSCODE_SHELL_LOGIN'];
|
||||
executableEnv['ZDOTDIR'] = env['ZDOTDIR'];
|
||||
const id = await this._localPtyService.createProcess(shellLaunchConfig, cwd, cols, rows, unicodeVersion, env, executableEnv, windowsEnableConpty, shouldPersist, this._getWorkspaceId(), this._getWorkspaceName());
|
||||
const pty = this._instantiationService.createInstance(LocalPty, id, shouldPersist);
|
||||
this._ptys.set(id, pty);
|
||||
|
||||
Reference in New Issue
Block a user