@@ -933,6 +933,8 @@ class InstallExtensionInProfileTask extends AbstractExtensionTask<ILocalExtensio
933
933
source : this . source instanceof URI ? 'vsix' : 'gallery' ,
934
934
} ;
935
935
936
+ let local : ILocalExtension | undefined ;
937
+
936
938
// VSIX
937
939
if ( this . source instanceof URI ) {
938
940
if ( existingExtension ) {
@@ -972,22 +974,22 @@ class InstallExtensionInProfileTask extends AbstractExtensionTask<ILocalExtensio
972
974
: this . options . installPreReleaseVersion || this . source . properties . isPreReleaseVersion || existingExtension ?. preRelease ;
973
975
974
976
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 ) ;
982
981
}
983
982
}
984
983
985
984
if ( token . isCancellationRequested ) {
986
985
throw toExtensionManagementError ( new CancellationError ( ) ) ;
987
986
}
988
987
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
+ }
991
993
992
994
if ( this . uriIdentityService . extUri . isEqual ( this . userDataProfilesService . defaultProfile . extensionsResource , this . options . profileLocation ) ) {
993
995
try {
0 commit comments