Prevent `VERSION=''` output caused by double local declaration.

Fixes #644.
master
Jordan Harband 2015-02-03 16:50:48 -08:00
parent 0f1f3ed29c
commit 59e27f8108
1 changed files with 1 additions and 2 deletions

3
nvm.sh
View File

@ -1090,11 +1090,10 @@ nvm() {
local PATTERN local PATTERN
PATTERN="$2" PATTERN="$2"
local VERSION
case "_$PATTERN" in case "_$PATTERN" in
"_$(nvm_iojs_prefix)" | "_$(nvm_iojs_prefix)-" \ "_$(nvm_iojs_prefix)" | "_$(nvm_iojs_prefix)-" \
| "_$(nvm_node_prefix)" | "_$(nvm_node_prefix)-") | "_$(nvm_node_prefix)" | "_$(nvm_node_prefix)-")
VERSION="$(nvm_version $PATTERN)" VERSION="$(nvm_version "$PATTERN")"
;; ;;
*) *)
VERSION="$(nvm_version "$PATTERN")" VERSION="$(nvm_version "$PATTERN")"