Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line feed issues prevent install scripts from running correctly on Windows hosts #14

Open
dmolesUC opened this issue Jun 16, 2015 · 10 comments

Comments

@dmolesUC
Copy link

Steps to reproduce:

  • on a windows machine, confirm that vagrant and virtualbox are installed and working
  • clone the repository using git-bash
  • cd to the repo directory and run vagrant up

Expected:

  • installation succeeds

Actual:

  • somewhere around the Solr installation, a bunch of error messages with \r in them

Analysis:

  • it looks like the scripts in install_scripts get CRLF line endings when checked out on Windows, and when copied to the virtual machine they still have these line endings.

Proposed fix:

  • use .gitattributes to force LF endings for these scripts (pull request forthcoming)
@philred
Copy link

philred commented Aug 6, 2015

I can verity this issue.

@ruebot
Copy link

ruebot commented Aug 6, 2015

@philred could you verify the proposed fix in #15?

@philred
Copy link

philred commented Aug 6, 2015

That didn't work for me. i'm still getting lines such as:

cannot stat ���/vagrant\r/downloads\r/solr-.tgz���

@awoods
Copy link

awoods commented Aug 6, 2015

@philred, do you have a patch that works for you? If so, please provide a pull-request.

@philred
Copy link

philred commented Aug 6, 2015

No, i manually used atom to change the line endings to unix.

@philred
Copy link

philred commented Aug 6, 2015

No idea why, but using https://github.com/dmolesUC3/fcrepo4-vagrant works but https://github.com/fcrepo4-labs/fcrepo4-vagrant with the #15 does not work for me.

@philred
Copy link

philred commented Aug 6, 2015

I just tested forking https://github.com/fcrepo4-labs/fcrepo4-vagrant and adding the gitattributes file on a linux box, then push/pull back to windows. This almost worked except localhost:8080/fcrepo didn't show up. I repeated cloning to windows and manually changing the line endings, and that worked.

@awoods
Copy link

awoods commented Aug 6, 2015

Something sounds fishy. I wish we had another Windows user lurking on this thread.

@philred
Copy link

philred commented Aug 27, 2015

Further investigation shows that autocrlf = true is automagically converting line endings to CRLF from the LF that vagrant up wants. Edit .gitconfig, set autocrlf = false, and then delete and reclone to make it work. No code changes required, but perhaps a troubleshooting note for windows users would be helpful.

@awoods
Copy link

awoods commented Aug 27, 2015

That is great, @philred. Could you please create a "troubleshooting" section to the README and submit as a pull-request?
That would be very helpful and appreciated.

awoods pushed a commit that referenced this issue Aug 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants