Skip to content

Commit

Permalink
Prevent VERSION='' output caused by double local declaration.
Browse files Browse the repository at this point in the history
Fixes #644.
  • Loading branch information
ljharb committed Feb 4, 2015
1 parent 0f1f3ed commit 59e27f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1090,11 +1090,10 @@ nvm() {

local PATTERN
PATTERN="$2"
local VERSION
case "_$PATTERN" in
"_$(nvm_iojs_prefix)" | "_$(nvm_iojs_prefix)-" \
| "_$(nvm_node_prefix)" | "_$(nvm_node_prefix)-")
VERSION="$(nvm_version $PATTERN)"
VERSION="$(nvm_version "$PATTERN")"
;;
*)
VERSION="$(nvm_version "$PATTERN")"
Expand Down

0 comments on commit 59e27f8

Please sign in to comment.