This commit is contained in:
Sandeep Somavarapu 2021-09-29 09:29:48 +02:00
parent 8dae395177
commit c2851b085c
No known key found for this signature in database
GPG key ID: 1FED25EC4646638B

View file

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
import { IExtensionManagementService, ILocalExtension, IGalleryExtension, IExtensionGalleryService, InstallOperation, InstallOptions, InstallVSIXOptions } from 'vs/platform/extensionManagement/common/extensionManagement';
import { IExtensionManagementService, ILocalExtension, IGalleryExtension, IExtensionGalleryService, InstallOperation, InstallOptions, InstallVSIXOptions, ExtensionManagementError, INSTALL_ERROR_INCOMPATIBLE } from 'vs/platform/extensionManagement/common/extensionManagement';
import { URI } from 'vs/base/common/uri';
import { ExtensionType, IExtensionManifest } from 'vs/platform/extensions/common/extensions';
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
@ -95,7 +95,7 @@ export class NativeRemoteExtensionManagementService extends ExtensionManagementC
private async checkAndGetCompatible(extension: IGalleryExtension): Promise<IGalleryExtension> {
const compatible = await this.galleryService.getCompatibleExtension(extension, await this.getTargetPlatform());
if (!compatible) {
return Promise.reject(new Error(localize('incompatible', "Unable to install extension '{0}' as it is not compatible with VS Code '{1}'.", extension.identifier.id, this.productService.version)));
throw new ExtensionManagementError(localize('notFoundCompatibleDependency', "Can't install '{0}' extension because it is not compatible with the current version of VS Code (version {1}).", extension.identifier.id, this.productService.version), INSTALL_ERROR_INCOMPATIBLE);
}
return compatible;
}