Skip to content
Myr

Update nvm.sh

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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.

authored by Peter Dave Hello · committed by Peter Dave Hello · parent 803be3a · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:nvm.sh+2 added
1614 unmodified lines
16151616 if [ "_$NVM_OS" = "_freebsd" ]; then1617 # node.js and io.js do not have a FreeBSD binary1618 nobinary=11619 echo "Currently, there is no binary for $NVM_OS" >&21620 elif [ "_$NVM_OS" = "_sunos" ]; then1621 # Not all node/io.js versions have a Solaris binary1622 if ! nvm_has_solaris_binary "$VERSION"; then1623 nobinary=11624 echo "Currently, there is no binary of version $VERSION for $NVM_OS" >&21625 fi1626 fi1627 local NVM_INSTALL_SUCCESS1628 # skip binary install if "nobinary" option specified.
654 unmodified lines