Merge pull request #77824 from microsoft/roblou/remoteEnvReconnection

Fix remote EH environment after reconnection
This commit is contained in:
Rob Lourens
2019-07-31 14:30:26 -07:00
committed by GitHub
6 changed files with 57 additions and 0 deletions

View File

@@ -749,6 +749,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> {