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) {