environment - depend on product service

This commit is contained in:
Benjamin Pasero
2021-03-15 11:56:03 +01:00
parent eb90b1c59c
commit 68a252ea77
17 changed files with 55 additions and 42 deletions
+5 -5
View File
@@ -95,8 +95,12 @@ class CliMain extends Disposable {
private async initServices(): Promise<[IInstantiationService, AppInsightsAppender[]]> {
const services = new ServiceCollection();
// Product
const productService = { _serviceBrand: undefined, ...product };
services.set(IProductService, productService);
// Environment
const environmentService = new NativeEnvironmentService(this.argv);
const environmentService = new NativeEnvironmentService(this.argv, productService);
services.set(INativeEnvironmentService, environmentService);
// Init folders
@@ -131,10 +135,6 @@ class CliMain extends Disposable {
const stateService = new StateService(environmentService, logService);
services.set(IStateService, stateService);
// Product
const productService = { _serviceBrand: undefined, ...product };
services.set(IProductService, productService);
const { appRoot, extensionsPath, extensionDevelopmentLocationURI, isBuilt, installSourcePath } = environmentService;
// Request