From 4eb517add9e04902e4b65e6462a05480c0e82058 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 21 Feb 2025 12:13:50 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 9896 (#6430) * Remove trailing slash addition to ExcludePaths * Remove the needless loop and, now defunct, comment --------- Co-authored-by: James Suplizio --- eng/common/scripts/Package-Properties.ps1 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index d64e671d1..bd445f7c6 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -185,14 +185,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) { $targetedFiles += $diff.DeletedFiles } - # The exclude paths and the targeted files paths aren't full OS paths, they're - # GitHub paths meaning they're relative to the repo root and slashes are forward - # slashes "/". The ExcludePaths need to have a trailing slash added in order - # correctly test for string matches without overmatching. For example, if a pr - # had files sdk/foo/file1 and sdk/foobar/file2 with the exclude of anything in - # sdk/foo, it should only exclude things under sdk/foo. The TrimEnd is just in - # case one of the paths ends with a slash, it doesn't add a second one. - $excludePaths = $diff.ExcludePaths | ForEach-Object { $_.TrimEnd("/") + "/" } + $excludePaths = $diff.ExcludePaths $additionalValidationPackages = @() $lookup = @{}