mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix extension install version check (#13436)
This commit is contained in:
@@ -161,8 +161,11 @@ export class ExtensionManagementService extends Disposable implements IExtension
|
|||||||
const identifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) };
|
const identifier = { id: getGalleryExtensionId(manifest.publisher, manifest.name) };
|
||||||
// let operation: InstallOperation = InstallOperation.Install; {{ SQL CARBON EDIT }}
|
// let operation: InstallOperation = InstallOperation.Install; {{ SQL CARBON EDIT }}
|
||||||
// {{ SQL CARBON EDIT }}
|
// {{ SQL CARBON EDIT }}
|
||||||
if (manifest.engines && ((manifest.engines.vscode && !isEngineValid(manifest.engines.vscode, product.vscodeVersion)) || (manifest.engines.azdata && !isEngineValid(manifest.engines.azdata, product.version)))) {
|
if (manifest.engines?.vscode && !isEngineValid(manifest.engines.vscode, product.vscodeVersion)) {
|
||||||
throw new Error(nls.localize('incompatible', "Unable to install extension '{0}' as it is not compatible with VS Code '{1}'.", identifier.id, product.version));
|
throw new Error(nls.localize('incompatible', "Unable to install extension '{0}' as it is not compatible with the current VS Code engine version '{1}'.", identifier.id, product.vscodeVersion));
|
||||||
|
}
|
||||||
|
if (manifest.engines?.azdata && !isEngineValid(manifest.engines.azdata, product.version)) {
|
||||||
|
throw new Error(nls.localize('incompatibleAzdata', "Unable to install extension '{0}' as it is not compatible with Azure Data Studio '{1}'.", identifier.id, product.version));
|
||||||
}
|
}
|
||||||
|
|
||||||
const identifierWithVersion = new ExtensionIdentifierWithVersion(identifier, manifest.version);
|
const identifierWithVersion = new ExtensionIdentifierWithVersion(identifier, manifest.version);
|
||||||
|
|||||||
Reference in New Issue
Block a user