diff --git a/eng/common/scripts/Service-Level-Readme-Automation.ps1 b/eng/common/scripts/Service-Level-Readme-Automation.ps1 index 2a3a89a56e..513871dfe8 100644 --- a/eng/common/scripts/Service-Level-Readme-Automation.ps1 +++ b/eng/common/scripts/Service-Level-Readme-Automation.ps1 @@ -189,10 +189,12 @@ foreach($moniker in $monikers) { $pkgKey = GetPackageKey $metadataEntry if($onboardedPackages.ContainsKey($pkgKey)) { if ($onboardedPackages[$pkgKey] -and $onboardedPackages[$pkgKey].DirectoryPath) { - Add-Member -InputObject $metadataEntry ` - -MemberType NoteProperty ` - -Name DirectoryPath ` - -Value $onboardedPackages[$pkgKey].DirectoryPath + if (!($metadataEntry.PSObject.Members.Name -contains "DirectoryPath")) { + Add-Member -InputObject $metadataEntry ` + -MemberType NoteProperty ` + -Name DirectoryPath ` + -Value $onboardedPackages[$pkgKey].DirectoryPath + } } $csvMetadata += $metadataEntry }