-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Update nvm.sh #899
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
Update nvm.sh #899
Conversation
820a5e5
to
da2a3fc
Compare
@@ -1616,10 +1616,12 @@ nvm() { | |||
if [ "_$NVM_OS" = "_freebsd" ]; then | |||
# node.js and io.js do not have a FreeBSD binary | |||
nobinary=1 | |||
echo "Currently, there is no binary for $NVM_OS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these both should echo to stderr, not stdout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, working on it.
This seems like a good approach. |
da2a3fc
to
8ae4a43
Compare
Updated! |
Your description says "return nonzero" but this PR doesn't achieve that - I think just the error message is sufficient tho. Do you agree? |
8ae4a43
to
5516f59
Compare
@ljharb my fault, that's the previous version of that commit before review, thanks for your prompt reply. |
@ljharb is this good to merge? Thanks. |
The tests were failing because of an SSL issue with |
Of course, give me few mins. |
5516f59
to
2a174d0
Compare
Add prompt when there is no binary for node version greater than v1.0.0 Currently, on FreeBSD, if we try `nvm install 4.2`, we will only get: > Installing node v1.0 and greater from source is not currently supported In fact I had no idea what's wrong because I didn't use `-s` parameter for it, and then I found that there are two reasons: 1. There was no pre-built nodejs binary from official for FreeBSD, which means we need to build from source. 2. nvm doesn't support build for v1.0 and greater version from source yet. So I think there should be a prompt message to tell the user about the reason why nvm will go to build from source, no matter it will succeed or fail.
@ljharb Updated! |
[install] on install, indicate that there's no binary for FreeBSD
Add prompt and return non-zero when there is no binary for node version greater than v1.0.0
Currently, on FreeBSD, if we try
nvm install 4.2
, we will only get:In fact I had no idea what's wrong because I didn't use
-s
parameter for it,and then I found that there are two reasons:
So I think there should be a prompt message to tell the user about the reason why nvm will go to build from source, no matter it will succeed or fail.