-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Error when using the Windows version of curl #3391
Comments
I didn't even know there was a windows version of curl. If it's possible for nvm to determine that's the version in use - or better, to feature-test for whatever's not working the same as real curl - then nvm can certainly check for that. Alternatively, if there's a fix we can make that allows it to work in this scenario, that's ideal. Unfortunately I'm not sure how this could be tested without your precise setup - in CI or on my end. |
This wasn't immediately obvious to me so I wanted to add an explanation of the cause. This is the warning:
What's happening is cygwin is using Windows's |
If there were plans to get You were okay with either solution, but I am interested in getting a better understanding of your thoughts on the matter, because it may help me level up my philosophy. |
I agree with you; the only way just using windows’ curl is viable is if it can reliably convert the Cygwin path to a Windows path, or, if we could use the windows curl to download to a windows temp dir, and then move it to a Cygwin path. If it can’t be done right, then an early error is indeed best. |
Operating system and version:
Windows 10
nvm debug
output:nvm ls
output:How did you install
nvm
?What steps did you perform?
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash nvm install 20
What happened?
In cygwin, the curl command is optional and if it's not installed, cygwin falls back to the windows curl command. The script installs even when using the windows curl. The problem happens later when
nvm install <x>
is used:What did you expect to happen?
I expected node v20.15.1 to download and install successfully.
My feature request: I would like the script to fail with a helpful error when using the Windows curl command. Without one, it's difficult to troubleshoot this error due to a couple of red herrings:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
succeeds, suggesting that curl isn't the issue.Warning: /home/MYUSER/.nvm/.cache/bin/node-v20.15.1-win-x64/node-v20.15.1-win-
) suggests this could be a CRLF/LF line ending issue.Is there anything in any of your profile files that modifies the
PATH
?.bash_profile
:PATH="${HOME}/bin:/cygdrive/c/Program\ Files/Mozilla\ Firefox:${PATH}:/home/MYUSER/.local/bin"
The text was updated successfully, but these errors were encountered: