-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Fresh install of NVM error due to CRLF newlines #728
Comments
What OS and shell are you using? Can you confirm that you installed |
Yes I installed using the curl command in the README. OS: Xubuntu 14.04.2 LTS |
Thanks - at what step did you receive the error? |
The install went perfect like I have done a dozen times. When I reload my shell to read my bashrc it throws the error when reading nvm.sh. |
Hmm, the |
@phillipsj on the command line, if you type |
jamie@xubu: |
The first command definitely shouldn't work at all, since it's not executable nor does it have a shebang. The second, however, definitely should. Can you try deleting |
Just try reinstalling and I am still getting the same error. |
@phillipsj The odd part is that you said you've used |
This is a fresh install on a new VM. I will get you a bash version. |
Here is my bash version: |
@phillipsj same here. Solved converting Windows end line to Unix endline for file ~/.nvm/nvm.sh (with notepad++ under Wine) and worked. Ubuntu 14.04 / GNU bash, versão 4.3.11(1)-release (x86_64-pc-linux-gnu) |
@fititnt It's hard to me to fix that, so if you can make a PR fixing that I'd be very happy :-) |
@ljharb Should be a better way to do it, because is a bit hacky that way. That should work even with \r. Maybe is just a problem with ubuntu or a missing |
@fititnt |
I'm also finding Windows-style line endings for NVM (wget'd), on my week-old Ubuntu 14.04 install. Although 'Notepad under Wine' will probably do the job, I'd use the 'dos2unix' command (
This command-line will find NVM's install files and removes '\r' line endings. Once that's was done, I just closed and re-opened the terminal. All seems well now - I have many NVM-prefixed commands on the terminal now, thanks. |
So I opened it in gedit and did a "Save As" and changed the line ending to unix/linux. GEdit did recognize it as windows line ending file. |
I think the issue for me is that I'm both on a Mac, and have my git settings set up to automatically make all line endings Unix. Could someone with Windows try a pull request that removes all the windows newlines on |
I should have the time later tonight and pull it down and submit the request. If someone else can get to it before feel free. |
@phillipsj looks like nobody has yet, if you still could that'd be awesome :-) |
Yep I will. |
Unfortunately the file names for the test directories are causing problems on a windows box. |
Hopefully forcing the line endings in the gitattributes will work it out of the system. These are the most frustrating issues. |
Submitted a new pull request. with the squash. I must be doing something wrong as I always have this pull requests issue. |
@phillipsj a force push to the same branch name (not deleting the branch on origin) should update the pull request neatly. nbd tho, thanks so much! |
After installation I receive the error. Not very good with BASH.
The text was updated successfully, but these errors were encountered: