Strip internal env vars when spawning the shell

This should fix all those reports of code-server dropping straight to
Node and things like #1121.
This commit is contained in:
Asher 2019-10-28 16:08:32 -05:00
parent 422503ef98
commit 197d0b6ca9
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -50,6 +50,21 @@ index a657f4a4d9..66bd13dffa 100644
} else if (typeof process === 'object') { } else if (typeof process === 'object') {
_isWindows = (process.platform === 'win32'); _isWindows = (process.platform === 'win32');
_isMacintosh = (process.platform === 'darwin'); _isMacintosh = (process.platform === 'darwin');
diff --git a/src/vs/base/common/processes.ts b/src/vs/base/common/processes.ts
index c52f7b3774..5635cfac8a 100644
--- a/src/vs/base/common/processes.ts
+++ b/src/vs/base/common/processes.ts
@@ -110,7 +110,9 @@ export function sanitizeProcessEnvironment(env: IProcessEnvironment, ...preserve
/^ELECTRON_.+$/,
/^GOOGLE_API_KEY$/,
/^VSCODE_.+$/,
- /^SNAP(|_.*)$/
+ /^SNAP(|_.*)$/,
+ /^NBIN_BYPASS$/,
+ /^LAUNCH_VSCODE$/
];
const envKeys = Object.keys(env);
envKeys
diff --git a/src/vs/base/node/languagePacks.js b/src/vs/base/node/languagePacks.js diff --git a/src/vs/base/node/languagePacks.js b/src/vs/base/node/languagePacks.js
index 3ae24454cb..fac8679290 100644 index 3ae24454cb..fac8679290 100644
--- a/src/vs/base/node/languagePacks.js --- a/src/vs/base/node/languagePacks.js