Skip to content

Commit 2e9e593

Browse files
committed
Latest update breaks due to proxy requirement. Fixes microsoft#142201
1 parent d6ee99e commit 2e9e593

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/vs/server/node/extensionHostConnection.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,7 @@ export class ExtensionHostConnection {
202202
// Run Extension Host as fork of current process
203203
const args = ['--type=extensionHost', `--uriTransformerPath=${uriTransformerPath}`];
204204
const useHostProxy = this._environmentService.args['use-host-proxy'];
205-
if (useHostProxy) {
206-
args.push(`--useHostProxy`);
207-
}
205+
args.push(`--useHostProxy=${useHostProxy ? 'true' : 'false'}`);
208206
this._extensionHostProcess = cp.fork(FileAccess.asFileUri('bootstrap-fork', require).fsPath, args, opts);
209207
const pid = this._extensionHostProcess.pid;
210208
this._log(`<${pid}> Launched Extension Host Process.`);

src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import 'vs/workbench/api/node/extHost.node.services';
3030
interface ParsedExtHostArgs {
3131
uriTransformerPath?: string;
3232
skipWorkspaceStorageLock?: boolean;
33-
useHostProxy?: boolean;
33+
useHostProxy?: 'true' | 'false'; // use a string, as undefined is also a valid value
3434
}
3535

3636
// workaround for https://github.com/microsoft/vscode/issues/85490
@@ -46,12 +46,12 @@ interface ParsedExtHostArgs {
4646

4747
const args = minimist(process.argv.slice(2), {
4848
string: [
49-
'uriTransformerPath'
49+
'uriTransformerPath',
50+
'useHostProxy' // 'true' | 'false' | undefined
5051
],
5152
boolean: [
52-
'skipWorkspaceStorageLock',
53-
'useHostProxy'
54-
]
53+
'skipWorkspaceStorageLock'
54+
],
5555
}) as ParsedExtHostArgs;
5656

5757
// With Electron 2.x and node.js 8.x the "natives" module
@@ -336,7 +336,7 @@ export async function startExtensionHostProcess(): Promise<void> {
336336
const { initData } = renderer;
337337
// setup things
338338
patchProcess(!!initData.environment.extensionTestsLocationURI); // to support other test frameworks like Jasmin that use process.exit (https://github.com/microsoft/vscode/issues/37708)
339-
initData.environment.useHostProxy = !!args.useHostProxy;
339+
initData.environment.useHostProxy = args.useHostProxy !== undefined ? args.useHostProxy !== 'false' : undefined;
340340
initData.environment.skipWorkspaceStorageLock = boolean(args.skipWorkspaceStorageLock, false);
341341

342342
// host abstraction

0 commit comments

Comments
 (0)