Preserve environment when forking shared process (#545)
This commit is contained in:
@@ -7,6 +7,7 @@ import { ParsedArgs } from "vs/platform/environment/common/environment";
|
||||
import { Emitter } from "@coder/events/src";
|
||||
import { retry } from "@coder/ide/src/retry";
|
||||
import { logger, field, Level } from "@coder/logger";
|
||||
import { preserveEnv } from "@coder/protocol";
|
||||
|
||||
export enum SharedProcessState {
|
||||
Stopped,
|
||||
@@ -88,13 +89,15 @@ export class SharedProcess {
|
||||
this.activeProcess.kill();
|
||||
}
|
||||
|
||||
const activeProcess = forkModule("vs/code/electron-browser/sharedProcess/sharedProcessMain", [], {
|
||||
let forkOptions = {
|
||||
env: {
|
||||
VSCODE_ALLOW_IO: "true",
|
||||
VSCODE_LOGS: process.env.VSCODE_LOGS,
|
||||
DISABLE_TELEMETRY: process.env.DISABLE_TELEMETRY,
|
||||
},
|
||||
}, this.userDataDir);
|
||||
VSCODE_ALLOW_IO: "true"
|
||||
}
|
||||
}
|
||||
|
||||
preserveEnv(forkOptions);
|
||||
|
||||
const activeProcess = forkModule("vs/code/electron-browser/sharedProcess/sharedProcessMain", [], forkOptions, this.userDataDir);
|
||||
this.activeProcess = activeProcess;
|
||||
|
||||
await new Promise((resolve, reject): void => {
|
||||
|
||||
Reference in New Issue
Block a user