src/vs/platform/extensionManagement/common/extensionsProfileScannerService.ts/ExtensionsProfileScannerService/addExtensionsToProfile
class ExtensionsProfileScannerService:	addExtensionsToProfile(extensions: [ILocalExtension, Metadata][], profileLocation: URI): Promise<IScannedProfileExtension[]> {
		return this.withProfileExtensions(profileLocation, profileExtensions => {
			// Remove the existing extension to avoid duplicates
			profileExtensions = profileExtensions.filter(e => extensions.some(([extension]) => !areSameExtensions(e.identifier, extension.identifier)));
			profileExtensions.push(...extensions.map(([extension, metadata]) => ({ identifier: extension.identifier, version: extension.manifest.version, location: extension.location, metadata })));
			return profileExtensions;
		});
	}