[Fix] Remove un-local var EXIT_CODE.

Might possibly be a fix to part of #1236
Jordan Harband 2016-09-18 02:00:32 -07:00
parent 8b3cf6cbcb
commit 256e75c789
1 changed files with 2 additions and 4 deletions

6
nvm.sh
View File

@ -2555,10 +2555,8 @@ nvm() {
# This nvm_ensure_version_installed call can be a performance bottleneck
# on shell startup. Perhaps we can optimize it away or make it faster.
nvm_ensure_version_installed "${VERSION}"
EXIT_CODE=$?
if [ "$EXIT_CODE" != "0" ]; then
return $EXIT_CODE
if ! nvm_ensure_version_installed "${VERSION}"; then
return $?
fi
local NVM_VERSION_DIR