Browse Source

[Refactor] Improve if conditoion logic in "use"

Peter Dave Hello 8 years ago committed by Jordan Harband
parent
commit
450088e51a
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
  1. 8
      nvm.sh

8
nvm.sh

@ -2697,12 +2697,10 @@ nvm() { @@ -2697,12 +2697,10 @@ nvm() {
nvm_echo "Now using system version of io.js: $(iojs --version 2>/dev/null)$(nvm_print_npm_version)"
fi
return
else
if [ $NVM_USE_SILENT -ne 1 ]; then
nvm_err 'System version of node not found.'
fi
return 127
elif [ $NVM_USE_SILENT -ne 1 ]; then
nvm_err 'System version of node not found.'
fi
return 127
elif [ "_$VERSION" = "_∞" ]; then
if [ $NVM_USE_SILENT -ne 1 ]; then
nvm_err "The alias \"$PROVIDED_VERSION\" leads to an infinite loop. Aborting."

Loading…
Cancel
Save