From 5143de9653a943e7fece1435876b654358c32f62 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 13 Jan 2015 01:04:45 -0800 Subject: [PATCH] Make `nvm_ls_current` work with `iojs`-prefixed versions. --- nvm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 662b603..6c1a88a 100644 --- a/nvm.sh +++ b/nvm.sh @@ -289,9 +289,11 @@ nvm_ls_current() { NVM_LS_CURRENT_NODE_PATH="$(command which node 2> /dev/null)" if [ $? -ne 0 ]; then echo 'none' + elif nvm_tree_contains_path "$(nvm_version_dir iojs)" "$NVM_LS_CURRENT_NODE_PATH"; then + echo "$(nvm_add_iojs_prefix $(iojs --version 2>/dev/null))" elif nvm_tree_contains_path "$NVM_DIR" "$NVM_LS_CURRENT_NODE_PATH"; then local VERSION - VERSION="$(node -v 2>/dev/null)" + VERSION="$(node --version 2>/dev/null)" if [ "$VERSION" = "v0.6.21-pre" ]; then echo "v0.6.21" else