[Fix] Fix install from src - npm detection

This commit is contained in:
Peter Dave Hello 2016-11-28 04:25:21 +08:00
parent 7b253c8c0a
commit 8f7898e27d

2
nvm.sh
View File

@ -1926,7 +1926,7 @@ nvm_install_source() {
command rm -f "${VERSION_PATH}" 2>/dev/null && \ command rm -f "${VERSION_PATH}" 2>/dev/null && \
$make -j "${NVM_MAKE_JOBS}" ${MAKE_CXX-} install $make -j "${NVM_MAKE_JOBS}" ${MAKE_CXX-} install
); then ); then
if ! nvm_has "npm" ; then if (nvm use "${VERSION}" && ! nvm_has "npm") ; then
nvm_echo 'Installing npm...' nvm_echo 'Installing npm...'
if nvm_version_greater 0.2.0 "$VERSION"; then if nvm_version_greater 0.2.0 "$VERSION"; then
nvm_err 'npm requires node v0.2.3 or higher' nvm_err 'npm requires node v0.2.3 or higher'