Cache the `nvm_node_prefix` call.

master
Jordan Harband 2015-04-04 14:31:56 -07:00
parent 96e73825bd
commit 108f630732
1 changed files with 3 additions and 1 deletions

4
nvm.sh
View File

@ -222,8 +222,10 @@ nvm_version() {
return $? return $?
fi fi
local NVM_NODE_PREFIX
NVM_NODE_PREFIX="$(nvm_node_prefix)"
case "_$PATTERN" in case "_$PATTERN" in
"_$(nvm_node_prefix)" | "_$(nvm_node_prefix)-") "_$NVM_NODE_PREFIX" | "_$NVM_NODE_PREFIX-")
PATTERN="stable" PATTERN="stable"
;; ;;
esac esac