Skip to content

Commit 82348c3

Browse files
authored
1 parent e34a260 commit 82348c3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/vs/platform/extensionManagement/node/extensionManagementService.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,13 @@ export class ExtensionManagementService extends AbstractExtensionManagementServi
152152
throw new Error(nls.localize('incompatible', "Unable to install extension '{0}' as it is not compatible with VS Code '{1}'.", extensionId, this.productService.version));
153153
}
154154

155-
const result = await this.installExtensions([{ manifest, extension: location, options }]);
156-
if (result[0]?.local) {
157-
return result[0]?.local;
155+
const results = await this.installExtensions([{ manifest, extension: location, options }]);
156+
const result = results.find(({ identifier }) => areSameExtensions(identifier, { id: extensionId }));
157+
if (result?.local) {
158+
return result.local;
158159
}
159-
if (result[0]?.error) {
160-
throw result[0].error;
160+
if (result?.error) {
161+
throw result.error;
161162
}
162163
throw toExtensionManagementError(new Error(`Unknown error while installing extension ${extensionId}`));
163164
} finally {

0 commit comments

Comments
 (0)