This commit is contained in:
Sandeep Somavarapu 2023-03-02 08:20:57 -08:00 committed by GitHub
parent 9abc735ffd
commit 1ab647fd44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -196,7 +196,8 @@ export class ExtensionManagementCLI {
private async getGalleryExtensions(extensions: InstallExtensionInfo[]): Promise<Map<string, IGalleryExtension>> {
const galleryExtensions = new Map<string, IGalleryExtension>();
const preRelease = extensions.some(e => e.installOptions.installPreReleaseVersion);
const result = await this.extensionGalleryService.getExtensions(extensions.map(e => ({ ...e, preRelease })), CancellationToken.None);
const targetPlatform = await this.extensionManagementService.getTargetPlatform();
const result = await this.extensionGalleryService.getExtensions(extensions.map(e => ({ ...e, preRelease })), { targetPlatform }, CancellationToken.None);
for (const extension of result) {
galleryExtensions.set(extension.identifier.id.toLowerCase(), extension);
}