mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-02-06 09:55:31 +08:00
potential performance optimization on NVM_AUTO_USE
This commit is contained in:
parent
0cd8789d1e
commit
9af1493550
@ -168,10 +168,10 @@ _zsh_nvm_auto_use() {
|
||||
return
|
||||
fi
|
||||
|
||||
local node_version="$(nvm version)"
|
||||
local nvmrc_path="$(nvm_find_nvmrc)"
|
||||
|
||||
if [[ -n "$nvmrc_path" ]]; then
|
||||
local node_version="$(nvm version)"
|
||||
local nvmrc_dir="$(dirname "$nvmrc_path")"
|
||||
local nvmrc_version="$(cat "$nvmrc_path")"
|
||||
local nvmrc_node_version="$(nvm version $(cat "$nvmrc_path"))"
|
||||
|
Loading…
Reference in New Issue
Block a user