clean-docker / Magento2

Docker Image to Magento 2 local development in Mac, Linux and Windows
https://hub.docker.com/r/rafaelcgstz/magento2/
MIT License
444 stars 251 forks source link

env: bash\r: No such file or directory #27

Open rafaelstz opened 6 years ago

rafaelstz commented 6 years ago

I've just made setup of env and a project. When running CURL command to init I get:

env: bash\r: No such file or directory
rafaelstz commented 6 years ago

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).

hpatel123 commented 5 years ago

@rafaelstz You saved my day. Helpful. You know I spent 1 day for this. Thanks.

CyrilZadorozhniy commented 5 years ago

@rafaelstz You saved my day too.

blendosantos commented 5 years ago

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).

Success, it worked perfectly for me. I was working on a Windows and I started using mac.

FLYINGKRIPTO commented 4 years ago

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).

this saved my life... i wasted like 2-3 days in solving this problem. thankyou for this solution

ankitjpk commented 4 years ago

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).

This saved my life tooo

noumansakhawat-dev commented 4 years ago

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).

you are real Life Saver

fernandofedora commented 4 years ago

Thank you the truth this works very well a real life saver

jamesmalin commented 4 years ago

Great answer, thanks!

nrubel commented 4 years ago

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).

Thanks brother. You are truly lifesaver.