mirror of
https://github.com/kellymichels/zscripts-token-savers
synced 2026-10-07 07:18:18 +00:00
fix(gitattributes): keep .bats files LF so 'bats tests/bash' works on a Windows checkout
The LF rule was scoped to 'bash/**', which does not match tests/bash/. With core.autocrlf a Windows working copy got CRLF .bats files, and bats fails on them - so the command the README documents would not run on the machine the suite was written on without stripping \r first. Adds tests/bash/** and *.bats to the same eol=lf rule and renormalises. Verified by running 'bats tests/bash' with no sed preprocessing: 50/50.
This commit is contained in:
parent
221cb34935
commit
b92338bfb7
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -1,6 +1,12 @@
|
|||||||
# Bash scripts must stay LF — CRLF breaks the shebang on Linux/macOS/WSL.
|
# Bash scripts must stay LF — CRLF breaks the shebang on Linux/macOS/WSL.
|
||||||
bash/** text eol=lf
|
bash/** text eol=lf
|
||||||
|
|
||||||
|
# The bats suites are bash too, and they live outside bash/ — without this a
|
||||||
|
# Windows checkout gets CRLF and `bats tests/bash` fails there (including when
|
||||||
|
# run through WSL against the Windows working copy).
|
||||||
|
tests/bash/** text eol=lf
|
||||||
|
*.bats text eol=lf
|
||||||
|
|
||||||
# PowerShell/cmd are happiest with CRLF on Windows.
|
# PowerShell/cmd are happiest with CRLF on Windows.
|
||||||
*.ps1 text eol=crlf
|
*.ps1 text eol=crlf
|
||||||
*.cmd text eol=crlf
|
*.cmd text eol=crlf
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user