chore: force LF on shell scripts and Dockerfile via .gitattributes#38
Merged
Conversation
Windows clients with core.autocrlf=true convert *.sh files to CRLF on checkout. When the entrypoint.sh is COPY'd into the Linux container image and executed, the shebang becomes "#!/usr/bin/env bash\r" which breaks with `/usr/bin/env: 'bash\r': No such file or directory`, preventing the container from starting. A .gitattributes file pins these file types to LF regardless of client autocrlf settings, so the Docker image is reproducible across Windows, macOS, and Linux contributors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Adds a
.gitattributesfile that pins*.sh,Dockerfile, and*.cypherto LF line endings regardless of clientcore.autocrlfsettings.Why
Windows clients with
core.autocrlf=true(the default for git for Windows) convert*.shto CRLF on checkout. Whendocker/entrypoint.shis thenCOPY'd into the Linux runtime image and executed, the shebang becomes:…which produces the cryptic startup error:
The MCP container then crashes and
/healthreturns 502. Hit this during the Rule-subtype deploy.Test plan
file docker/entrypoint.shshows "no CRLF line terminators"docker compose -f docker-compose.yml -f docker-compose.dev.yml build --no-cache graph-memory-mcp && docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --force-recreate graph-memory-mcpworks cleanly[graph-memory] startup transport=http pid=1(not the env shebang error)🤖 Generated with Claude Code