Add .gitattributes: force LF line endings for shell scripts
Without this, git on macOS with core.autocrlf=true checks out .sh files with CRLF. Bash then reads 'CONTAINER_NAME\r' as the variable name (never set), causing 'unbound variable' with set -u. https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH
This commit is contained in:
parent
e1a01173ed
commit
1dc70ff046
1 changed files with 14 additions and 0 deletions
14
.gitattributes
vendored
Normal file
14
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Force LF line endings for shell scripts on all platforms.
|
||||||
|
# Without this, git on macOS/Windows with core.autocrlf=true checks out
|
||||||
|
# .sh files with CRLF, which causes bash to read variable names as
|
||||||
|
# "VARNAME\r" and fail with "unbound variable" errors.
|
||||||
|
*.sh text eol=lf
|
||||||
|
|
||||||
|
# Other text files — normalise to LF in the repo.
|
||||||
|
*.rs text eol=lf
|
||||||
|
*.toml text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
|
*.yml text eol=lf
|
||||||
|
*.yaml text eol=lf
|
||||||
|
*.env* text eol=lf
|
||||||
|
Caddyfile text eol=lf
|
||||||
Loading…
Add table
Reference in a new issue