diff --git a/src/vs/server/node/extensionHostConnection.ts b/src/vs/server/node/extensionHostConnection.ts index deb7cc25ee6ad..76ac7662928e3 100644 --- a/src/vs/server/node/extensionHostConnection.ts +++ b/src/vs/server/node/extensionHostConnection.ts @@ -202,9 +202,7 @@ export class ExtensionHostConnection { // Run Extension Host as fork of current process const args = ['--type=extensionHost', `--uriTransformerPath=${uriTransformerPath}`]; const useHostProxy = this._environmentService.args['use-host-proxy']; - if (useHostProxy) { - args.push(`--useHostProxy`); - } + args.push(`--useHostProxy=${useHostProxy ? 'true' : 'false'}`); this._extensionHostProcess = cp.fork(FileAccess.asFileUri('bootstrap-fork', require).fsPath, args, opts); const pid = this._extensionHostProcess.pid; this._log(`<${pid}> Launched Extension Host Process.`); diff --git a/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts b/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts index 758c168a6f51e..4490d895b3ae2 100644 --- a/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts +++ b/src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts @@ -30,7 +30,7 @@ import 'vs/workbench/api/node/extHost.node.services'; interface ParsedExtHostArgs { uriTransformerPath?: string; skipWorkspaceStorageLock?: boolean; - useHostProxy?: boolean; + useHostProxy?: 'true' | 'false'; // use a string, as undefined is also a valid value } // workaround for https://github.com/microsoft/vscode/issues/85490 @@ -46,12 +46,12 @@ interface ParsedExtHostArgs { const args = minimist(process.argv.slice(2), { string: [ - 'uriTransformerPath' + 'uriTransformerPath', + 'useHostProxy' // 'true' | 'false' | undefined ], boolean: [ - 'skipWorkspaceStorageLock', - 'useHostProxy' - ] + 'skipWorkspaceStorageLock' + ], }) as ParsedExtHostArgs; // With Electron 2.x and node.js 8.x the "natives" module @@ -336,7 +336,7 @@ export async function startExtensionHostProcess(): Promise { const { initData } = renderer; // setup things patchProcess(!!initData.environment.extensionTestsLocationURI); // to support other test frameworks like Jasmin that use process.exit (https://github.com/microsoft/vscode/issues/37708) - initData.environment.useHostProxy = !!args.useHostProxy; + initData.environment.useHostProxy = args.useHostProxy !== undefined ? args.useHostProxy !== 'false' : undefined; initData.environment.skipWorkspaceStorageLock = boolean(args.skipWorkspaceStorageLock, false); // host abstraction