Fix remote EH environment after reconnection

For microsoft/vscode-remote-release#16
This commit is contained in:
Rob Lourens
2019-07-23 08:37:13 -07:00
parent 300eea4039
commit c23b8fd5e1
7 changed files with 57 additions and 1 deletions

View File

@@ -758,6 +758,20 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
return buff;
}
public async $setRemoteEnvironment(env: { [key: string]: string | null }): Promise<void> {
if (!this._initData.remote.isRemote) {
return;
}
for (const key in env) {
const value = env[key];
if (value === null) {
delete process.env[key];
} else {
process.env[key] = value;
}
}
}
}
function loadCommonJSModule<T>(logService: ILogService, modulePath: string, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {