1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 05:49:26 +00:00

node: Prefer nodenv over nvm when available

Reverse `nodenv` vs `nvm` selection order, preferring `nodenv` instead.

For additional rationale, see: https://github.com/nodenv/nodenv/wiki/Why-nodenv%3F
This commit is contained in:
Indrajit Raychaudhuri
2021-05-16 20:11:48 -05:00
committed by Indrajit Raychaudhuri
parent af46875c5e
commit f84075b8d4
3 changed files with 29 additions and 29 deletions

View File

@ -15,12 +15,12 @@ local version_formatted
unset node_info
typeset -gA node_info
if (( $+functions[nvm_version] )); then
version="${$(nvm_version)#v}"
elif (( $+commands[nodenv] )); then
if (( $+commands[nodenv] )); then
version="${${$(nodenv version)#v}[(w)0]}"
elif (( $+functions[nvm_version] )); then
version="${$(nvm_version)#v}"
elif (( $+commands[node] )) ; then
version="${$(node -v)#v}"
version="${$(node -v)#v}"
fi
if [[ "$version" != (none|system) ]]; then