I have a vagrant box where I change the default Ubuntu shell to oh-my-zsh
.
I have a shared folder containing a .zshrc
that I copy to the vagrant home folder during provisioning. At some point the line ending for one line in the .zshrc
has ^M
appended to it so I get the following error when I vagrant ssh
:
/home/vagrant/.zshrc:source:4: no such file or directory: /home/vagrant/.oh-my-zsh/oh-my-zsh.sh^M
The ^M
is not visible in the .zshrc
file. If I use vim in the vagrant box and re-write the .zshrc
file then everything works as expected.
How can I ensure my .zshrc
won't have this line ending character appended during the process of git clone
-ing the repo and vagrant up
-ing the box?
I'm using Vagrant in Windows 7.
based on this you can make the following setting in git
and you will have no issues when cloning the project