3 ms·
LF vs CRLF
by DatDay 1y ago
LF vs CRLF
- mdaniel 1y agoWhich is incredibly painful on Windows systems doing a git clone of shell scripts, since core.autocrlf is often helpful, but not for shell scripts, since it causes the weirdest looking error messages: MSYS$ cat build.sh #!/bin/bash echo "hello, world" MSYS$ ./build.sh : not found: 2: build.sh e.g. https://askubuntu.com/questions/370124/not-found-error-when-running-a-script-with-sh https://askubuntu.com/questions/370124/not-found-error-when-... Polite projects will have .gitattributes specifying that .sh or .bash or bin/* or whatever are to always checkout with eol=lf <https://git-scm.com/docs/gitattributes#_eol https://git-scm.com/docs/gitattributes#_eol> As best I can tell, .ps1 does tolerate Unix lf but I'd bet good money that .bat and .cmd definitely do not
- qouteall 1y agoThanks for reminding. Added.