mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 01:25:38 -05:00
Fix extension gallery query to use correct version (#11040)
* Fix extension gallery query to use correct version * Only require one engine of either type
This commit is contained in:
@@ -847,11 +847,16 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
|
||||
|
||||
private getLastValidExtensionVersionFromProperties(extension: IRawGalleryExtension, versions: IRawGalleryExtensionVersion[]): Promise<IRawGalleryExtensionVersion> | null {
|
||||
for (const version of versions) {
|
||||
const engine = getEngine(version);
|
||||
if (!engine) {
|
||||
// {{SQL CARBON EDIT}}
|
||||
const vsCodeEngine = getEngine(version);
|
||||
const azDataEngine = getAzureDataStudioEngine(version);
|
||||
// Require at least one engine version
|
||||
if (!vsCodeEngine && !azDataEngine) {
|
||||
return null;
|
||||
}
|
||||
if (isEngineValid(engine, this.productService.version)) {
|
||||
const vsCodeEngineValid = !vsCodeEngine || (vsCodeEngine && isEngineValid(vsCodeEngine, this.productService.vscodeVersion));
|
||||
const azDataEngineValid = !azDataEngine || (azDataEngine && isEngineValid(azDataEngine, this.productService.version));
|
||||
if (vsCodeEngineValid && azDataEngineValid) {
|
||||
return Promise.resolve(version);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user