File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
119119 foreach ($pkg in $allPackageProperties )
120120 {
121121 $pkgDirectory = Resolve-Path " $ ( $pkg.DirectoryPath ) "
122- $lookupKey = ($pkg.DirectoryPath ).Replace($RepoRoot , " " ).SubString( 1 )
122+ $lookupKey = ($pkg.DirectoryPath ).Replace($RepoRoot , " " ).TrimStart( ' \/ ' )
123123 $lookup [$lookupKey ] = $pkg
124124
125125 foreach ($file in $targetedFiles )
@@ -132,12 +132,15 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
132132 if ($pkg.AdditionalValidationPackages ) {
133133 $additionalValidationPackages += $pkg.AdditionalValidationPackages
134134 }
135+
136+ # avoid adding the same package multiple times
137+ break
135138 }
136139 }
137140 }
138141
139142 foreach ($addition in $additionalValidationPackages ) {
140- $key = $addition.Replace ($RepoRoot , " " ).SubString( 1 )
143+ $key = $addition.Replace ($RepoRoot , " " ).TrimStart( ' \/ ' )
141144
142145 if ($lookup [$key ]) {
143146 $packagesWithChanges += $lookup [$key ]
You can’t perform that action at this time.
0 commit comments