Hypertopic / HyperGlosae

A Nelsonian hypertext infrastructure for digital humanities
11 stars 21 forks source link

The new `setup.sh` file to quickly get started with the backend has `CRLF` line endings. #202

Closed raphaelweis closed 5 months ago

raphaelweis commented 5 months ago

This is a problem because this file is a .sh file meant to run on UNIX systems. On ubuntu WSL, attempting to run the file will result in the following error :

-bash: ./setup.sh: /bin/sh^M: bad interpreter: No such file or directory

To correct this problem, one can run dos2unix to convert the line endings to LF, but this will change the file. Maybe an eslint rule can be added to enforce LF line endings, preventing such issues in the future ?

benel commented 5 months ago

This is really weird...

@raphaelweis Which version of git (Windows or Linux) do you use?

which git

What is your autocrlf setting?

git config --global core.autocrlf
raphaelweis commented 5 months ago

This is a mistake on my end, I tried accessing my repository on windows from my wsl instance, which means that git for windows had checked out the repo with CRLF including the setup.sh file.

Sorry for this mistake.

benel commented 5 months ago

Sorry for this mistake.

No problem @raphaelweis. This discussion will be helpful for people experiencing the same problem :)