Give remote resolvers a way to set environment variables in the remote EH

Fix #77234, for microsoft/vscode-remote-release#16
This commit is contained in:
Rob Lourens
2019-07-15 14:59:35 -07:00
parent 25733b47ae
commit 7ee0e1818a
12 changed files with 75 additions and 37 deletions

View File

@@ -662,12 +662,24 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
try {
const result = await resolver.resolve(remoteAuthority, { resolveAttempt });
// Support the old resolver interface, TODO remove after awhile
const authority = typeof (<any>result).host === 'string' ?
{
authority: remoteAuthority,
host: (<any>result).host,
port: (<any>result).port
} :
{
authority: remoteAuthority,
host: result.authority.host,
port: result.authority.port
};
return {
type: 'ok',
value: {
authority: remoteAuthority,
host: result.host,
port: result.port,
authority,
options: result.options
}
};
} catch (err) {