Skip to content

Commit c0f7b0e

Browse files
committed
Add VSCODE_PROXY_URI to terminal environment
I also moved VSCODE_IPC_HOOK_CLI (although it's always undefined right now anyway) to match since we want both of these to always be set.
1 parent 43ea911 commit c0f7b0e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/vscode/src/vs/server/node/channel.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,6 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
499499
return args.configuration['terminal.integrated.env.linux'];
500500
};
501501

502-
const getNonInheritedEnv = async (): Promise<platform.IProcessEnvironment> => {
503-
const env = await getMainProcessParentEnv(process.env);
504-
env.VSCODE_IPC_HOOK_CLI = process.env['VSCODE_IPC_HOOK_CLI']!;
505-
return env;
506-
};
507-
508502
const env = terminalEnvironment.createTerminalEnvironment(
509503
shellLaunchConfig,
510504
getEnvFromConfig(),
@@ -513,9 +507,12 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
513507
args.configuration['terminal.integrated.detectLocale'],
514508
args.configuration['terminal.integrated.inheritEnv'] !== false
515509
? process.env as platform.IProcessEnvironment
516-
: await getNonInheritedEnv()
510+
: await getMainProcessParentEnv(process.env)
517511
);
518512

513+
env.VSCODE_PROXY_URI = args.resolverEnv?.VSCODE_PROXY_URI || process.env.VSCODE_PROXY_URI;
514+
env.VSCODE_IPC_HOOK_CLI = process.env.VSCODE_IPC_HOOK_CLI;
515+
519516
// Apply extension environment variable collections to the environment.
520517
if (!shellLaunchConfig.strictEnv) {
521518
// They come in an array and in serialized format.

0 commit comments

Comments
 (0)