Enforce LF line endings for .devcontainer/.bashrc#2480
Conversation
On Windows, .devcontainer/.bashrc was checked out with CRLF line endings (no .gitattributes rule covered it), causing the dev container's bash to fail loading it with `$'\r': command not found` errors and breaking the prompt's git-branch helper. Add a `.devcontainer/.bashrc text eol=lf` rule so the file stays LF on all platforms, following the existing convention for bin/*, *.sh and *.rb. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA single line is added to ChangesLine ending normalization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~1 minute Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.gitattributes:
- Line 18: The gitattributes rule correctly targets .devcontainer/.bashrc, but
docker-compose.yml has a broken mount configuration that tries to mount
./.bashrc (which does not exist at the repository root) into the container. To
fix this, update the mount configuration in docker-compose.yml to reference
.devcontainer/.bashrc instead of ./.bashrc, or alternatively create and commit a
.bashrc file at the repository root for the container to use. Choose whichever
approach aligns with your project's intended structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
Good catch and a clean fix — the One thing worth considering: would cover the whole directory without needing per-file entries. The current single-file rule is perfectly fine for now — just flagging the option in case you'd prefer to be more future-proof without adding a bigger change. Otherwise this is correct, minimal, and consistent with the existing conventions in Generated by Claude Code |
chore: sync upstream — enforce LF for .devcontainer/.bashrc (we-promise#2480)
Enforce LF line endings for .devcontainer/.bashrc (we-promise#2480)
What
Adds a
.gitattributesrule to enforce LF line endings on.devcontainer/.bashrc.Why
On Windows,
.devcontainer/.bashrcwas checked out with CRLF line endings because no.gitattributesrule covered it. Inside the dev container, bash then fails to load it:This breaks the custom shell prompt (the
git_branch/git_status_markerhelpers) for anyone developing on Windows via the dev container.Fix
This follows the existing convention in the same file (
bin/*,*.sh,*.rbare already pinned toeol=lffor the same reason).Safety / impact
.gitattributes..bashrcis consumed only by Linux bash inside the container.🤖 Generated with Claude Code
Summary by CodeRabbit