Skip to content

Commit 49c1a3e

Browse files
authored
fix: unexpected error when execCommand workbench.extensions.installExtension (microsoft#210135)
fix: microsoft#210129
1 parent 82af5cd commit 49c1a3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ CommandsRegistry.registerCommand({
358358
const extension = extensionsWorkbenchService.local.find(e => areSameExtensions(e.identifier, { id, uuid: version }));
359359
if (extension?.enablementState === EnablementState.DisabledByExtensionKind) {
360360
const [gallery] = await extensionGalleryService.getExtensions([{ id, preRelease: options?.installPreReleaseVersion }], CancellationToken.None);
361-
if (gallery) {
361+
if (!gallery) {
362362
throw new Error(localize('notFound', "Extension '{0}' not found.", arg));
363363
}
364364
await extensionManagementService.installFromGallery(gallery, {

0 commit comments

Comments
 (0)