Skip to content

Commit e1f27e6

Browse files
authored
1 parent 35d97bc commit e1f27e6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,13 @@ export class ExtensionsScanner extends Disposable {
599599
metadata = { ...source?.metadata, ...metadata };
600600

601601
if (target) {
602-
await this.extensionsProfileScannerService.updateMetadata([[extension, { ...target.metadata, ...metadata }]], toProfileLocation);
602+
if (this.uriIdentityService.extUri.isEqual(target.location, extension.location)) {
603+
await this.extensionsProfileScannerService.updateMetadata([[extension, { ...target.metadata, ...metadata }]], toProfileLocation);
604+
} else {
605+
const targetExtension = await this.scanLocalExtension(target.location, extension.type, toProfileLocation);
606+
await this.extensionsProfileScannerService.removeExtensionFromProfile(targetExtension, toProfileLocation);
607+
await this.extensionsProfileScannerService.addExtensionsToProfile([[extension, { ...target.metadata, ...metadata }]], toProfileLocation);
608+
}
603609
} else {
604610
await this.extensionsProfileScannerService.addExtensionsToProfile([[extension, metadata]], toProfileLocation);
605611
}

0 commit comments

Comments
 (0)