make it possible to disable auto-use after shell init

This commit is contained in:
Eric Henderson 2022-02-15 17:11:47 -05:00
parent 52d743363c
commit 0cd8789d1e

View File

@ -164,6 +164,9 @@ _zsh_nvm_revert() {
autoload -U add-zsh-hook autoload -U add-zsh-hook
_zsh_nvm_auto_use() { _zsh_nvm_auto_use() {
_zsh_nvm_has nvm_find_nvmrc || return _zsh_nvm_has nvm_find_nvmrc || return
if [[ $NVM_AUTO_USE != 'true' ]]; then
return
fi
local node_version="$(nvm version)" local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)" local nvmrc_path="$(nvm_find_nvmrc)"