Fix xargs#4308
Open
rasapala wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates the Windows CI unit test summary extraction to avoid reliance on xargs (and other Unix-like tools) by switching to a PowerShell-based approach.
Changes:
- Replaced
grep | head | cut | xargs | headpipeline with a single PowerShell command to extract the relevant portion ofwin_test_summary.log.
| def summaryContent | ||
| if (markerLine == 0) { | ||
| summaryContent = bat(returnStatus: false, returnStdout: true, script: '@grep -n "Check tests summary in" win_test_summary.log | head -1 | cut -d: -f1 | xargs -I{} head -{} win_test_summary.log').trim() | ||
| summaryContent = bat(returnStatus: false, returnStdout: true, script: '@powershell -NoProfile -Command "$content = Get-Content ''win_test_summary.log''; $marker = ($content | Select-String -SimpleMatch ''Check tests summary in'' | Select-Object -First 1).LineNumber; if ($marker) { $content[0..([Math]::Max(0, [int]$marker - 1))] -join [Environment]::NewLine } else { $content | Select-Object -First 150 | Out-String }"').trim() |
mzegla
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 Summary
Switch unix xargs prone to env tool settings errors on node windows setup to native powershell command.
🧪 Checklist
``