Skip to content

Commit 8ae4a43

Browse files
Update nvm.sh
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: > 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.
1 parent 9972de6 commit 8ae4a43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nvm.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,10 +1616,12 @@ nvm() {
16161616
if [ "_$NVM_OS" = "_freebsd" ]; then
16171617
# node.js and io.js do not have a FreeBSD binary
16181618
nobinary=1
1619+
echo "Currently, there is no binary for $NVM_OS" >&2
16191620
elif [ "_$NVM_OS" = "_sunos" ]; then
16201621
# Not all node/io.js versions have a Solaris binary
16211622
if ! nvm_has_solaris_binary "$VERSION"; then
16221623
nobinary=1
1624+
echo "Currently, there is no binary of version $VERSION for $NVM_OS" >&2
16231625
fi
16241626
fi
16251627
local NVM_INSTALL_SUCCESS

0 commit comments

Comments
 (0)