Skip to content

chore: force LF on shell scripts and Dockerfile via .gitattributes#38

Merged
stevepridemore merged 1 commit into
mainfrom
chore/gitattributes-lf
May 17, 2026
Merged

chore: force LF on shell scripts and Dockerfile via .gitattributes#38
stevepridemore merged 1 commit into
mainfrom
chore/gitattributes-lf

Conversation

@stevepridemore
Copy link
Copy Markdown
Owner

Summary

Adds a .gitattributes file that pins *.sh, Dockerfile, and *.cypher to LF line endings regardless of client core.autocrlf settings.

Why

Windows clients with core.autocrlf=true (the default for git for Windows) convert *.sh to CRLF on checkout. When docker/entrypoint.sh is then COPY'd into the Linux runtime image and executed, the shebang becomes:

#!/usr/bin/env bash\r

…which produces the cryptic startup error:

/usr/bin/env: 'bash\r': No such file or directory

The MCP container then crashes and /health returns 502. Hit this during the Rule-subtype deploy.

Test plan

  • Fresh clone on Windows: file docker/entrypoint.sh shows "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-mcp works cleanly
  • Container logs show [graph-memory] startup transport=http pid=1 (not the env shebang error)

🤖 Generated with Claude Code

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>
@stevepridemore stevepridemore merged commit b7b44af into main May 17, 2026
2 checks passed
@stevepridemore stevepridemore deleted the chore/gitattributes-lf branch May 17, 2026 19:59
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