diff --git a/eng/common/scripts/Update-DocsMsMetadata.ps1 b/eng/common/scripts/Update-DocsMsMetadata.ps1 index 426fe2d2c4ce..d9c7f7e552d4 100644 --- a/eng/common/scripts/Update-DocsMsMetadata.ps1 +++ b/eng/common/scripts/Update-DocsMsMetadata.ps1 @@ -149,8 +149,10 @@ function GetPackageInfoJson ($packageInfoJsonLocation) { function UpdateDocsMsMetadataForPackage($packageInfoJsonLocation, $packageInfo) { $originalVersion = [AzureEngSemanticVersion]::ParseVersionString($packageInfo.Version) - - $packageMetadataArray = (Get-CSVMetadata).Where({ $_.Package -eq $packageInfo.Name -and $_.GroupId -eq $packageInfo.Group -and $_.Hide -ne 'true' -and $_.New -eq 'true' }) + $packageMetadataArray = (Get-CSVMetadata).Where({ $_.Package -eq $packageInfo.Name -and $_.Hide -ne 'true' -and $_.New -eq 'true' }) + if ($packageMetadataArray.GroupId) { + $packageMetadataArray = ($packageMetadataArray).Where({$_.GroupId -eq $packageInfo.Group}) + } if ($packageMetadataArray.Count -eq 0) { LogWarning "Could not retrieve metadata for $($packageInfo.Name) from metadata CSV. Using best effort defaults." $packageMetadata = $null