Resolve variables in profile correctly on remotes

Fixes #125510
This commit is contained in:
Daniel Imms 2021-06-08 05:55:14 -07:00
parent 1acefe49a7
commit 5f8c13a707

View file

@ -321,7 +321,7 @@ export abstract class BaseTerminalProfileResolverService implements ITerminalPro
// Resolve path variables
const env = await this._context.getEnvironment(options.remoteAuthority);
const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.file);
const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(options.remoteAuthority ? Schemas.vscodeRemote : Schemas.file);
const lastActiveWorkspace = activeWorkspaceRootUri ? withNullAsUndefined(this._workspaceContextService.getWorkspaceFolder(activeWorkspaceRootUri)) : undefined;
profile.path = this._resolveVariables(profile.path, env, lastActiveWorkspace);