diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 040d012edb6f5..0e703a9d43743 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -114,10 +114,12 @@ function Get-PrPkgProperties([string]$InputDiffJson) { foreach($pkg in $allPackageProperties) { + $pkgDirectory = Resolve-Path "$($pkg.DirectoryPath)" + foreach($file in $targetedFiles) { $filePath = Resolve-Path (Join-Path $RepoRoot $file) - $shouldInclude = $filePath -like "$($pkg.DirectoryPath)*" + $shouldInclude = $filePath -like "$pkgDirectory*" if ($shouldInclude) { $packagesWithChanges += $pkg }