Cache the nvm_node_prefix call.

This commit is contained in:
Jordan Harband 2015-04-04 14:31:56 -07:00
parent 96e73825bd
commit 108f630732

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