Skip to content

Commit 81443ef

Browse files
authored
Filter out ExcludePaths from PR files before processing (Azure#39672)
1 parent a66dd2f commit 81443ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ function Get-python-AdditionalValidationPackagesFromPackageSet {
4848
$targetedFiles += $diff.DeletedFiles
4949
}
5050

51+
# The targetedFiles needs to filter out anything in the ExcludePaths
52+
# otherwise it'll end up processing things below that it shouldn't be.
53+
foreach ($excludePath in $diffObj.ExcludePaths) {
54+
$targetedFiles = $targetedFiles | Where-Object { -not $_.StartsWith($excludePath) }
55+
}
56+
5157
if ($targetedFiles) {
5258
foreach($file in $targetedFiles) {
5359
$pathComponents = $file -split "/"

0 commit comments

Comments
 (0)