Merge from vscode f5d3ffa6a0d655c87e1eb0e1e90773df58f7ff25 (#7929)

* Merge from vscode f5d3ffa6a0d655c87e1eb0e1e90773df58f7ff25

* fix launch script

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-22 21:49:55 -07:00
committed by GitHub
parent 4a68ab4659
commit a94cbb528e
189 changed files with 1976 additions and 1541 deletions

View File

@@ -123,7 +123,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._extHostDocumentsAndEditors, configProvider);
}
public async $spawnExtHostProcess(id: number, shellLaunchConfigDto: IShellLaunchConfigDto, activeWorkspaceRootUriComponents: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise<void> {
public async $spawnExtHostProcess(id: number, shellLaunchConfigDto: IShellLaunchConfigDto, activeWorkspaceRootUriComponents: UriComponents | undefined, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise<void> {
const shellLaunchConfig: IShellLaunchConfig = {
name: shellLaunchConfigDto.name,
executable: shellLaunchConfigDto.executable,
@@ -156,16 +156,21 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
}
const activeWorkspaceRootUri = URI.revive(activeWorkspaceRootUriComponents);
// Get the environment
const apiLastActiveWorkspace = await this._extHostWorkspace.getWorkspaceFolder(activeWorkspaceRootUri);
const lastActiveWorkspace = apiLastActiveWorkspace ? {
uri: apiLastActiveWorkspace.uri,
name: apiLastActiveWorkspace.name,
index: apiLastActiveWorkspace.index,
toResource: () => {
throw new Error('Not implemented');
let lastActiveWorkspace: IWorkspaceFolder | null = null;
if (activeWorkspaceRootUriComponents && activeWorkspaceRootUri) {
// Get the environment
const apiLastActiveWorkspace = await this._extHostWorkspace.getWorkspaceFolder(activeWorkspaceRootUri);
if (apiLastActiveWorkspace) {
lastActiveWorkspace = {
uri: apiLastActiveWorkspace.uri,
name: apiLastActiveWorkspace.name,
index: apiLastActiveWorkspace.index,
toResource: () => {
throw new Error('Not implemented');
}
};
}
} as IWorkspaceFolder : null;
}
// Get the initial cwd
const terminalConfig = configProvider.getConfiguration('terminal.integrated');