Skip to content

Add .gitattributes to enforce LF line endings for shell scripts#184

Open
r23riopel wants to merge 1 commit into
CatholicOS:devfrom
r23riopel:fix/windows-lf-line-endings
Open

Add .gitattributes to enforce LF line endings for shell scripts#184
r23riopel wants to merge 1 commit into
CatholicOS:devfrom
r23riopel:fix/windows-lf-line-endings

Conversation

@r23riopel

@r23riopel r23riopel commented Jun 28, 2026

Copy link
Copy Markdown

Summary
Adds a .gitattributes rule to ensure shell scripts (*.sh) are always checked out with LF line endings.

Motivation
On Windows, Git can convert shell scripts to CRLF depending on a user's Git configuration. When those scripts are mounted into Linux containers, Docker/WSL may fail to execute them because the interpreter path is treated as /bin/bash\r.

Result
This change preserves LF line endings for shell scripts across platforms and helps avoid Docker startup failures for Windows developers.

Summary by CodeRabbit

  • Chores
    • Standardized line endings for shell scripts to improve consistency across different operating systems and development environments.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9a46247-c0b6-49dd-88ff-44a985d418e7

📥 Commits

Reviewing files that changed from the base of the PR and between 09bfc88 and 77f76e6.

📒 Files selected for processing (1)
  • .gitattributes

📝 Walkthrough

Walkthrough

A single line is added to .gitattributes enforcing LF line endings (eol=lf) for all *.sh shell script files.

Changes

Shell Script Line Ending Enforcement

Layer / File(s) Summary
LF rule for shell scripts
.gitattributes
Adds *.sh eol=lf to enforce Unix line endings on all shell scripts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minute

Poem

A line in the file, so simple and slight,
"Give shell scripts their endings of LF tonight!"
No CRLF creeping, no Windows in sight,
The rabbit hops onward with Unix delight. 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the change to enforce LF line endings for shell scripts via .gitattributes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant