mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Tidy up terminal env creation
This commit is contained in:
@@ -445,12 +445,6 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
env: shellLaunchConfigDto.env
|
||||
};
|
||||
|
||||
// Get cwd
|
||||
const configProvider = await this._extHostConfiguration.getConfigProvider();
|
||||
const terminalConfig = configProvider.getConfiguration('terminal.integrated');
|
||||
const activeWorkspaceRootUri = URI.revive(activeWorkspaceRootUriComponents);
|
||||
const initialCwd = terminalEnvironment.getCwd(shellLaunchConfig, os.homedir(), activeWorkspaceRootUri, terminalConfig.cwd);
|
||||
|
||||
// Merge in shell and args from settings
|
||||
const platformKey = platform.isWindows ? 'windows' : (platform.isMacintosh ? 'osx' : 'linux');
|
||||
if (!shellLaunchConfig.executable) {
|
||||
@@ -467,6 +461,12 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
|
||||
terminalEnvironment.mergeDefaultShellPathAndArgs(shellLaunchConfig, fetchSetting, isWorkspaceShellAllowed || false);
|
||||
}
|
||||
|
||||
// Get the initial cwd
|
||||
const configProvider = await this._extHostConfiguration.getConfigProvider();
|
||||
const terminalConfig = configProvider.getConfiguration('terminal.integrated');
|
||||
const activeWorkspaceRootUri = URI.revive(activeWorkspaceRootUriComponents);
|
||||
const initialCwd = terminalEnvironment.getCwd(shellLaunchConfig, os.homedir(), activeWorkspaceRootUri, terminalConfig.cwd);
|
||||
|
||||
// TODO: Pull in and resolve config settings
|
||||
// // Resolve env vars from config and shell
|
||||
// const lastActiveWorkspaceRoot = this._workspaceContextService.getWorkspaceFolder(lastActiveWorkspaceRootUri);
|
||||
|
||||
Reference in New Issue
Block a user