From 78fee308ca3d0e8a7ebb21ddc52b8a3e2b31e21f Mon Sep 17 00:00:00 2001 From: samhanic <55490861+samhanic@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:28:17 +0100 Subject: [PATCH] review fix --- .../common/extensionManagementCLI.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/extensionManagement/common/extensionManagementCLI.ts b/src/vs/platform/extensionManagement/common/extensionManagementCLI.ts index 08dd0fb2761..cd67533d2c8 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagementCLI.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagementCLI.ts @@ -205,12 +205,13 @@ export class ExtensionManagementCLI { this.logger.info(localize('updateExtensionsNewVersionsAvailable', "Updating extensions: {0}", extensionsToUpdate.map(ext => ext.extension.identifier.id).join(', '))); const installationResult = await this.extensionManagementService.installGalleryExtensions(extensionsToUpdate); - const failed: string[] = installationResult.filter(ext => ext.error).map(ext => ext.identifier.id); - if (failed.length) { - throw new Error(localize('updateExtensionsFailed', "Failed updating extensions: {0}", failed.join(', '))); + for (const extensionResult of installationResult) { + if (extensionResult.error) { + this.logger.error(localize('errorUpdatingExtension', "Error while updating extension {0}: {1}", extensionResult.identifier.id, getErrorMessage(extensionResult.error))); + } else { + this.logger.info(localize('successUpdate', "Extension '{0}' v{1} was successfully updated.", extensionResult.identifier.id, extensionResult.local?.manifest.version)); + } } - - this.logger.info(localize('updateExtensionsDone', "Successfully updated {0} extensions", extensionsToUpdate.length)); } private async installVSIX(vsix: URI, installOptions: InstallOptions, force: boolean, installedExtensions: ILocalExtension[]): Promise {