Magento2 icon indicating copy to clipboard operation
Magento2 copied to clipboard

env: bash\r: No such file or directory

Open rafaelstz opened this issue 6 years ago • 10 comments

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 avatar Dec 21 '17 15:12 rafaelstz

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

rafaelstz avatar Dec 21 '17 15:12 rafaelstz

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

hpatel123 avatar Oct 30 '18 04:10 hpatel123

@rafaelstz You saved my day too.

CyrilZadorozhniy avatar Jan 31 '19 12:01 CyrilZadorozhniy

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.

blendosantos avatar Aug 21 '19 04:08 blendosantos

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

FLYINGKRIPTO avatar Sep 22 '19 05:09 FLYINGKRIPTO

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

ankitjpk avatar Nov 15 '19 21:11 ankitjpk

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

NoumanSakhawat avatar Jan 20 '20 08:01 NoumanSakhawat

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

fernandofedora avatar Apr 03 '20 16:04 fernandofedora

Great answer, thanks!

jamesmalin avatar May 21 '20 19:05 jamesmalin

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.

nrubel avatar Jun 14 '20 03:06 nrubel