fix(build): preserve LF for shell entrypoints - #1272
Open
xumian520 wants to merge 3 commits into
Open
Conversation
Signed-off-by: xumian520 <126989134+xumian520@users.noreply.github.com>
Signed-off-by: xumian520 <126989134+xumian520@users.noreply.github.com>
Signed-off-by: xumian520 <126989134+xumian520@users.noreply.github.com>
Owner
|
Thank you for the contribution and for adding a regression contract around LF shell entrypoints on Windows checkouts. This is now triaged as a high-priority Windows build bug for |
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.
What does this PR do?
Preserve LF checkout semantics for shell entrypoints so Windows clones with
core.autocrlf=truecan run repository scripts directly from WSL or MSYS. Without this rule, the shebang can be checked out as CRLF and fail withenv: $'bash\r': No such file or directory.This adds a shell line-ending contract test and runs it before the compiler-heavy suite. The test checks all tracked
*.shfiles and shell hook entrypoints withgit check-attr.Validation
bash tests/test_shell_line_endings.sh: 60/60 entrypoints passedbash scripts/build.sh: passedcodebase-memory-mcp devgit diff --check: passedChecklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)