src/vs/server/node/remoteAgentEnvironmentImpl.ts/RemoteAgentEnvironmentChannel/constructor
class RemoteAgentEnvironmentChannel:	constructor(
		private readonly _connectionToken: ServerConnectionToken,
		private readonly _environmentService: IServerEnvironmentService,
		private readonly _userDataProfilesService: IUserDataProfilesService,
		extensionManagementCLIService: IExtensionManagementCLIService,
		private readonly _logService: ILogService,
		private readonly _extensionHostStatusService: IExtensionHostStatusService,
		private readonly _extensionsScannerService: IExtensionsScannerService,
	) {
		if (_environmentService.args['install-builtin-extension']) {
			const installOptions: InstallOptions = { isMachineScoped: !!_environmentService.args['do-not-sync'], installPreReleaseVersion: !!_environmentService.args['pre-release'] };
			this.whenExtensionsReady = extensionManagementCLIService.installExtensions([], _environmentService.args['install-builtin-extension'], installOptions, !!_environmentService.args['force'])
				.then(null, error => {
					_logService.error(error);
				});
		} else {
			this.whenExtensionsReady = Promise.resolve();
		}

		const extensionsToInstall = _environmentService.args['install-extension'];
		if (extensionsToInstall) {
			const idsOrVSIX = extensionsToInstall.map(input => /\.vsix$/i.test(input) ? URI.file(isAbsolute(input) ? input : join(cwd(), input)) : input);
			this.whenExtensionsReady
				.then(() => extensionManagementCLIService.installExtensions(idsOrVSIX, [], { isMachineScoped: !!_environmentService.args['do-not-sync'], installPreReleaseVersion: !!_environmentService.args['pre-release'] }, !!_environmentService.args['force']))
				.then(null, error => {
					_logService.error(error);
				});
		}
	}