From 014a44e15408ddcd6dc8c2ed9f781b2bfbd084d0 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 10 Sep 2015 22:37:50 +0900 Subject: [PATCH] Minor refactoring to "install from source" logic tree. --- nvm.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index 97251dd..7f69db9 100755 --- a/nvm.sh +++ b/nvm.sh @@ -1442,7 +1442,11 @@ nvm() { fi fi if [ "$NVM_INSTALL_SUCCESS" != true ]; then - if [ "$NVM_IOJS" = true ]; then + if [ "$NVM_IOJS" != true ] && [ "$NVM_NODE_MERGED" != true ]; then + if nvm_install_node_source "$VERSION" "$ADDITIONAL_PARAMETERS"; then + NVM_INSTALL_SUCCESS=true + fi + elif [ "$NVM_IOJS" = true ]; then # nvm_install_iojs_source "$VERSION" "$ADDITIONAL_PARAMETERS" echo "Installing iojs from source is not currently supported" >&2 return 105 @@ -1450,8 +1454,6 @@ nvm() { # nvm_install_merged_node_source "$VERSION" "$ADDITIONAL_PARAMETERS" echo "Installing node v1.0 and greater from source is not currently supported" >&2 return 106 - elif nvm_install_node_source "$VERSION" "$ADDITIONAL_PARAMETERS"; then - NVM_INSTALL_SUCCESS=true fi fi