Skip to content

Commit b7b44af

Browse files
chore: force LF on shell scripts and Dockerfile via .gitattributes (#38)
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>
1 parent fabdea0 commit b7b44af

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Force LF line endings on shell scripts and Dockerfile so Windows
2+
# checkouts don't break the entrypoint shim when copied into a Linux
3+
# container. (Symptom: `/usr/bin/env: 'bash\r': No such file or directory`
4+
# on container start.)
5+
*.sh text eol=lf
6+
Dockerfile text eol=lf
7+
*.cypher text eol=lf

0 commit comments

Comments
 (0)