Skip to content

Commit 1a3f4e3

Browse files
committed
Configure LF line endings for all shell scripts
This adjustes `.gitattributes` to normalize line endings to LF (Unix style line endings) for all shell scripts in the project, not just shell scripts that are fixture scripts. Previously, shell scripts related to journey tests were not normalized this way. This is simpler to write, and `bash` and POSIX shell scripts are required to have LF line endings to be correct in general. On Windows, some `bash` builds (including the MSYS2 `bash` provided as part of the Git Bash environment) are patched to automatically accept Windows-style line endings, but I believe they are still considered technically incorrect. In practice, the effect of not using LF line endings when working with shell scripts on Windows may usually be where other tools are involved: ShellCheck, and at least some language servers for `bash` script editing, complain if CRLF line endings are used.
1 parent 881b601 commit 1a3f4e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
**/generated-archives/*.tar* filter=lfs-disabled diff=lfs merge=lfs -text
22

33
# assure line feeds don't interfere with our working copy hash
4-
**/tests/fixtures/**/*.sh text crlf=input eol=lf
5-
/justfile text crlf=input eol=lf
4+
*.sh text crlf=input eol=lf
5+
justfile text crlf=input eol=lf
66

77
# have GitHub include fixture-making scripts when it counts code
88
**/tests/fixtures/**/*.sh linguist-vendored=false

0 commit comments

Comments
 (0)