1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 13:15:25 +00:00

fix(lib/vscode): refactor productService

This commit is contained in:
Akash Satheesan 2021-04-16 00:14:16 +05:30
parent 8ffb87dbc9
commit bdf555a06e
No known key found for this signature in database
GPG Key ID: 93CBAADFEA703F8E

View File

@ -209,7 +209,8 @@ export class Vscode {
// ../../electron-browser/sharedProcess/sharedProcessMain.ts#L148 // ../../electron-browser/sharedProcess/sharedProcessMain.ts#L148
// ../../../code/electron-main/app.ts // ../../../code/electron-main/app.ts
private async initializeServices(args: NativeParsedArgs): Promise<void> { private async initializeServices(args: NativeParsedArgs): Promise<void> {
const environmentService = new NativeEnvironmentService(args, this.services.get<IProductService>(IProductService) as IProductService); const productService = { _serviceBrand: undefined, ...product };
const environmentService = new NativeEnvironmentService(args, productService);
// https://github.com/cdr/code-server/issues/1693 // https://github.com/cdr/code-server/issues/1693
fs.mkdirSync(environmentService.globalStorageHome.fsPath, { recursive: true }); fs.mkdirSync(environmentService.globalStorageHome.fsPath, { recursive: true });
const logService = new MultiplexLogService([ const logService = new MultiplexLogService([
@ -244,7 +245,7 @@ export class Vscode {
this.services.set(IRequestService, new SyncDescriptor(RequestService)); this.services.set(IRequestService, new SyncDescriptor(RequestService));
this.services.set(IFileService, fileService); this.services.set(IFileService, fileService);
this.services.set(IProductService, { _serviceBrand: undefined, ...product }); this.services.set(IProductService, productService);
const machineId = await getMachineId(); const machineId = await getMachineId();