From 1ff75cb396ce937c02422732e9ad0ca1ef1da5eb Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Fri, 17 Jan 2025 10:07:52 -0800 Subject: [PATCH] Fix condition in protected file check (#32215) --- .github/workflows/protected-files.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protected-files.yaml b/.github/workflows/protected-files.yaml index 25c7c79af85c..71671523be1b 100644 --- a/.github/workflows/protected-files.yaml +++ b/.github/workflows/protected-files.yaml @@ -32,7 +32,7 @@ jobs: $protectedFiles = @("package.json", "package-lock.json", ".github/*", "eng/*") $changedFiles = @(Get-ChangedFiles -baseCommitish HEAD^ -targetCommitish HEAD -diffFilter "") - $matchedFiles = @($changedFiles | Where-Object { $changedFile = $_; $protectedFiles | ForEach-Object { $changedFile -like $_ } }) + $matchedFiles = @($changedFiles | Where-Object { $changedFile = $_; $protectedFiles | Where-Object { $changedFile -like $_ } }) if ($matchedFiles.Count -gt 0) { foreach ($file in $matchedFiles) {