Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Pasero <benjpas@microsoft.com>2021-10-22 17:40:26 +0300
committerGitHub <noreply@github.com>2021-10-22 17:40:26 +0300
commit8fbf9b600d575873a9ed92126847e43b7333aa8e (patch)
tree978a9356f330157a14ff626485a3604e268347fc /src/vs/platform/extensionManagement/node/extensionManagementService.ts
parentfac06c7af7ba35a55f612f40ffecff0c19b2b100 (diff)
debt - use product service in more places (#135651)
Diffstat (limited to 'src/vs/platform/extensionManagement/node/extensionManagementService.ts')
-rw-r--r--src/vs/platform/extensionManagement/node/extensionManagementService.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts
index ea2f48cf945..73600eca6af 100644
--- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts
+++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts
@@ -36,7 +36,7 @@ import { isEngineValid } from 'vs/platform/extensions/common/extensionValidator'
import { IFileService } from 'vs/platform/files/common/files';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ILogService } from 'vs/platform/log/common/log';
-import product from 'vs/platform/product/common/product';
+import { IProductService } from 'vs/platform/product/common/productService';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
const INSTALL_ERROR_UNSET_UNINSTALLED = 'unsetUninstalled';
@@ -62,8 +62,9 @@ export class ExtensionManagementService extends AbstractExtensionManagementServi
@IDownloadService private downloadService: IDownloadService,
@IInstantiationService instantiationService: IInstantiationService,
@IFileService private readonly fileService: IFileService,
+ @IProductService productService: IProductService
) {
- super(galleryService, telemetryService, logService);
+ super(galleryService, telemetryService, logService, productService);
const extensionLifecycle = this._register(instantiationService.createInstance(ExtensionsLifecycle));
this.extensionsScanner = this._register(instantiationService.createInstance(ExtensionsScanner, extension => extensionLifecycle.postUninstall(extension)));
this.manifestCache = this._register(new ExtensionsManifestCache(environmentService, this));
@@ -139,8 +140,8 @@ export class ExtensionManagementService extends AbstractExtensionManagementServi
const downloadLocation = await this.downloadVsix(vsix);
const manifest = await getManifest(path.resolve(downloadLocation.fsPath));
- if (manifest.engines && manifest.engines.vscode && !isEngineValid(manifest.engines.vscode, product.version, product.date)) {
- throw new Error(nls.localize('incompatible', "Unable to install extension '{0}' as it is not compatible with VS Code '{1}'.", getGalleryExtensionId(manifest.publisher, manifest.name), product.version));
+ if (manifest.engines && manifest.engines.vscode && !isEngineValid(manifest.engines.vscode, this.productService.version, this.productService.date)) {
+ throw new Error(nls.localize('incompatible', "Unable to install extension '{0}' as it is not compatible with VS Code '{1}'.", getGalleryExtensionId(manifest.publisher, manifest.name), this.productService.version));
}
return this.installExtension(manifest, downloadLocation, options);