Skip to content

Commit 6ebb2c9

Browse files
authored
1 parent ca688da commit 6ebb2c9

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,8 @@ class InstallExtensionInProfileTask extends AbstractExtensionTask<ILocalExtensio
933933
source: this.source instanceof URI ? 'vsix' : 'gallery',
934934
};
935935

936+
let local: ILocalExtension | undefined;
937+
936938
// VSIX
937939
if (this.source instanceof URI) {
938940
if (existingExtension) {
@@ -972,22 +974,22 @@ class InstallExtensionInProfileTask extends AbstractExtensionTask<ILocalExtensio
972974
: this.options.installPreReleaseVersion || this.source.properties.isPreReleaseVersion || existingExtension?.preRelease;
973975

974976
if (existingExtension && existingExtension.type !== ExtensionType.System && existingExtension.manifest.version === this.source.version) {
975-
return this.extensionsScanner.updateMetadata(existingExtension, metadata);
976-
}
977-
978-
// Unset if the extension is uninstalled and return the unset extension.
979-
const local = await this.unsetIfUninstalled(this.extensionKey);
980-
if (local) {
981-
return local;
977+
local = await this.extensionsScanner.updateMetadata(existingExtension, metadata);
978+
} else {
979+
// Unset if the extension is uninstalled and return the unset extension.
980+
local = await this.unsetIfUninstalled(this.extensionKey);
982981
}
983982
}
984983

985984
if (token.isCancellationRequested) {
986985
throw toExtensionManagementError(new CancellationError());
987986
}
988987

989-
const { local, verificationStatus } = await this.extractExtensionFn(this.operation, token);
990-
this._verificationStatus = verificationStatus;
988+
if (!local) {
989+
const result = await this.extractExtensionFn(this.operation, token);
990+
local = result.local;
991+
this._verificationStatus = result.verificationStatus;
992+
}
991993

992994
if (this.uriIdentityService.extUri.isEqual(this.userDataProfilesService.defaultProfile.extensionsResource, this.options.profileLocation)) {
993995
try {

0 commit comments

Comments
 (0)