fix(ci): line endings check fails on symbolic links - #952
Conversation
|
This is considered urgent for the development of #939 |
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
|
May I request high priority for this one, @lizhengfeng101 @stay-foolish-forever , thank you. |
|
Nice catch on the symlink issue — confirmed locally that One small suggestion on the failure message. Right now it's a rhetorical question:
if ! git diff --cached --quiet; then
echo "::error::Line endings must be LF. Run 'git add --renormalize .' and commit the diff below."
git diff --cached --stat
exit 1
fiNon-blocking either way — just closes the loop between "here's the error" and "here's the exact command to fix it." |
|
That is reasonable. Done. |
|
@lizhengfeng101 Any updates on this? |
* fix(ci): line endings check fails on symbolic links * chore: update err msg
Description
The original step is:
Git reports symlinks with empty i/ and w/ fields, so the symlink line does not match any of the allowed patterns. grep still finds that line and exits 0, which makes the if branch run and fail the job.
Now the logic is:
git diff --quiet --cachedType of Change
How Has This Been Tested?
make testpasses locallyI tested my fix on the failing pull request feat(pages): standardize web crawler policy #939
Checklist
go fmt,go vet)Related Issues
none