Skip to content

Commit bdf555a

Browse files
author
Akash Satheesan
committed
fix(lib/vscode): refactor productService
1 parent 8ffb87d commit bdf555a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/vscode/src/vs/server/node/server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ export class Vscode {
209209
// ../../electron-browser/sharedProcess/sharedProcessMain.ts#L148
210210
// ../../../code/electron-main/app.ts
211211
private async initializeServices(args: NativeParsedArgs): Promise<void> {
212-
const environmentService = new NativeEnvironmentService(args, this.services.get<IProductService>(IProductService) as IProductService);
212+
const productService = { _serviceBrand: undefined, ...product };
213+
const environmentService = new NativeEnvironmentService(args, productService);
213214
// https://github.com/cdr/code-server/issues/1693
214215
fs.mkdirSync(environmentService.globalStorageHome.fsPath, { recursive: true });
215216
const logService = new MultiplexLogService([
@@ -244,7 +245,7 @@ export class Vscode {
244245

245246
this.services.set(IRequestService, new SyncDescriptor(RequestService));
246247
this.services.set(IFileService, fileService);
247-
this.services.set(IProductService, { _serviceBrand: undefined, ...product });
248+
this.services.set(IProductService, productService);
248249

249250
const machineId = await getMachineId();
250251

0 commit comments

Comments
 (0)