Skip to content

Instantly share code, notes, and snippets.

@nrubel
Last active June 23, 2020 10:17
Show Gist options
  • Save nrubel/04b26f940007a7a333b1c54572c77976 to your computer and use it in GitHub Desktop.
Save nrubel/04b26f940007a7a333b1c54572c77976 to your computer and use it in GitHub Desktop.
env: bash\r: No such file or directory

Ok, here is how I fixed the issue,
I had to convert all files in the project directory:

Mac

brew install dos2unix # Installs dos2unix Mac
find . -type f -exec dos2unix {} \; # recursively removes windows related stuff

Linux

sudo apt-get install -y dos2unix # Installs dos2unix Linux
sudo find . -type f -exec dos2unix {} \; # recursively removes windows related stuff

Make sure that you're using on your Windows your git configured with this:

git config --global core.autocrlf input

This will instruct git to always commit text files with Linux line ending (\n).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment