mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
cli: declare use-host-proxy as boolean
This commit is contained in:
@@ -201,8 +201,8 @@ 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 !== undefined) {
|
||||
args.push(`--useHostProxy=${useHostProxy}`);
|
||||
if (useHostProxy) {
|
||||
args.push(`--useHostProxy`);
|
||||
}
|
||||
this._extensionHostProcess = cp.fork(FileAccess.asFileUri('bootstrap-fork', require).fsPath, args, opts);
|
||||
const pid = this._extensionHostProcess.pid;
|
||||
|
||||
@@ -350,7 +350,7 @@ export class RemoteAgentEnvironmentChannel implements IServerChannel {
|
||||
os: platform.OS,
|
||||
arch: process.arch,
|
||||
marks: performance.getMarks(),
|
||||
useHostProxy: (this.environmentService.args['use-host-proxy'] !== undefined)
|
||||
useHostProxy: !!this.environmentService.args['use-host-proxy']
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export const serverOptions: OptionDescriptions<ServerParsedArgs> = {
|
||||
'enable-remote-auto-shutdown': { type: 'boolean' },
|
||||
'remote-auto-shutdown-without-delay': { type: 'boolean' },
|
||||
|
||||
'use-host-proxy': { type: 'string' },
|
||||
'use-host-proxy': { type: 'boolean' },
|
||||
'without-browser-env-var': { type: 'boolean' },
|
||||
|
||||
/* ----- server cli ----- */
|
||||
@@ -162,7 +162,7 @@ export interface ServerParsedArgs {
|
||||
'enable-remote-auto-shutdown'?: boolean;
|
||||
'remote-auto-shutdown-without-delay'?: boolean;
|
||||
|
||||
'use-host-proxy'?: string;
|
||||
'use-host-proxy'?: boolean;
|
||||
'without-browser-env-var'?: boolean;
|
||||
|
||||
/* ----- server cli ----- */
|
||||
|
||||
@@ -30,7 +30,7 @@ import 'vs/workbench/api/node/extHost.node.services';
|
||||
interface ParsedExtHostArgs {
|
||||
uriTransformerPath?: string;
|
||||
skipWorkspaceStorageLock?: boolean;
|
||||
useHostProxy?: string;
|
||||
useHostProxy?: boolean;
|
||||
}
|
||||
|
||||
// workaround for https://github.com/microsoft/vscode/issues/85490
|
||||
@@ -46,11 +46,11 @@ interface ParsedExtHostArgs {
|
||||
|
||||
const args = minimist(process.argv.slice(2), {
|
||||
string: [
|
||||
'uriTransformerPath',
|
||||
'useHostProxy'
|
||||
'uriTransformerPath'
|
||||
],
|
||||
boolean: [
|
||||
'skipWorkspaceStorageLock'
|
||||
'skipWorkspaceStorageLock',
|
||||
'useHostProxy'
|
||||
]
|
||||
}) as ParsedExtHostArgs;
|
||||
|
||||
@@ -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 !== undefined ? args.useHostProxy !== 'false' : undefined;
|
||||
initData.environment.useHostProxy = !!args.useHostProxy;
|
||||
initData.environment.skipWorkspaceStorageLock = boolean(args.skipWorkspaceStorageLock, false);
|
||||
|
||||
// host abstraction
|
||||
|
||||
Reference in New Issue
Block a user