From 256e75c789627c36d1a4c9726860dcf16329c239 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 18 Sep 2016 02:00:32 -0700 Subject: [PATCH] [Fix] Remove un-local var EXIT_CODE. Might possibly be a fix to part of #1236 --- nvm.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nvm.sh b/nvm.sh index 5249d04..19eb547 100644 --- a/nvm.sh +++ b/nvm.sh @@ -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