From 68a9e2f0202cf953ff620caf927d8db5c0ad8ba2 Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 7 Dec 2021 22:09:22 +0000 Subject: [PATCH] Add back sanitization of our env variables This partially fixes https://github.com/cdr/code-server/issues/4519. We use an environment variable to distinguish the parent process from the child so without sanitizing when you spawn code-server from VS Code it always looks like we are in the parent and the process will fail since it is not actually the child. --- src/vs/base/common/processes.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/base/common/processes.ts b/src/vs/base/common/processes.ts index 6c52c3f9ce2bf..83a9af5ea171d 100644 --- a/src/vs/base/common/processes.ts +++ b/src/vs/base/common/processes.ts @@ -111,6 +111,8 @@ export function sanitizeProcessEnvironment(env: IProcessEnvironment, ...preserve /^VSCODE_.+$/, /^SNAP(|_.*)$/, /^GDK_PIXBUF_.+$/, + /^CODE_SERVER_.+$/, + /^CS_.+$/, ]; const envKeys = Object.keys(env); envKeys