Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

doesn't work in windows #17

Closed
jfmatth opened this issue Mar 12, 2014 · 3 comments
Closed

doesn't work in windows #17

jfmatth opened this issue Mar 12, 2014 · 3 comments

Comments

@jfmatth
Copy link

jfmatth commented Mar 12, 2014

Looks like the scripts have /r in them, causing the git pull in windows to bring down wrong files. I'll try again and post more info

@spapas
Copy link
Contributor

spapas commented Mar 12, 2014

Hello @jfmatth, I have already come across the issue you mention (I mostly use Winows) and, (as a Q+D solution) if you convert endlines in the .sh files from windows to unix Vagrant provision will work.

This is caused by the core.autocrlf setting (http://git-scm.com/book/ch7-1.html) which is tweaked when you install git for windows (the installer will ask you what you want to do with your line endings when checking out code and commiting).

The git for windows installer says that the best option is to have autocrfl = true. This means that when you commit your line endings will be converted to windows (that's why you see the \r in the privisioning .sh files) and when you check out your line endings will be converted to unix.

There is a great amount of discussion in SO on which should be the best autocrfl strategy (http://stackoverflow.com/questions/2825428/why-should-i-use-core-autocrlf-true-in-git and http://stackoverflow.com/questions/170961/whats-the-best-crlf-handling-strategy-with-git), but my recommendation, since we are talking about the python world, is to use autocrlf = input. That way, when you commit files containing windows line endings they will be converted to unix, but you won't convert unix line endings when you check out (so, .sh scripts will work).

@jfmatth
Copy link
Author

jfmatth commented Mar 13, 2014

@spapas , thanks for the very thorough explanation. I've seen this before on other vagrant installs on Windows (cloud foundry comes to mind). It's a huge pain

I may try and run it on cygwin, and see what happens. Ill let you know.

J

@jfmatth jfmatth closed this as completed Mar 13, 2014
@jfmatth jfmatth reopened this Mar 13, 2014
@jfmatth jfmatth closed this as completed Mar 13, 2014
@jfmatth
Copy link
Author

jfmatth commented Mar 13, 2014

OK, so i installed in Cygwin with your suggestions, and it worked fine. I'll try in Windows next, but wanted to update you.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants