From a49f77135ad4256dc410a785bfb0ca74e5154b6f Mon Sep 17 00:00:00 2001 From: Chakrit Wichian Date: Sun, 19 Feb 2012 18:12:14 +0700 Subject: [PATCH] `nvm version` and `nvm ls` not correctly reporting current version on both zsh and bash. --- nvm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index b72bd0d..1f92a5c 100755 --- a/nvm.sh +++ b/nvm.sh @@ -38,7 +38,8 @@ nvm_ls() PATTERN=$1 VERSIONS='' if [ "$PATTERN" = 'current' ]; then - VERSION=`node -v 2>/dev/null` + echo `node -v 2>/dev/null` + return fi if [ -f "$NVM_DIR/alias/$PATTERN" ]; then