Skip to content

Shell script line endings when cloned on Windows and run through WSL #20

Answered by Vampire
kousu asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there, sorry for the long delay.
I thought about this a bit.

I'm sorry, but I don't think I'll add that to the documentation of the action.
One point is that I would recommend setting .gitattributes, then the next person comes and requests to change the advice to using autocrlf and so on.

This is a general Git issue.
Imho you should always and in any Git repository that potentially ever is cloned on multiple operating systems (so basically each and every repository) add a .gitattributes file that pins *.bat line endings to CRLF and shell script line endings to LF.
Even if you only ever clone on Windows without WSL you could get in trouble if you for example use Cygwin.

I simply think …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Vampire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #5 on February 07, 2022 12:18.