Skip to content

Commit

Permalink
Merge pull request #142441 from microsoft/aeschli/142201
Browse files Browse the repository at this point in the history
Latest update breaks due to proxy requirement.
  • Loading branch information
aeschli authored Feb 9, 2022
2 parents 443ac03 + 2e9e593 commit 1ebe50c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/vs/server/node/extensionHostConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -336,7 +336,7 @@ export async function startExtensionHostProcess(): Promise<void> {
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
Expand Down

0 comments on commit 1ebe50c

Please sign in to comment.