Fix loading of nvm for brew-installed nvm

This reverts to the original (working) version from 2017. During the most recent refactor to use the `_bash_it_homebrew_check` helper method, it was overlooked that `${BASH_IT_HOMEBREW_PREFIX}/nvm.sh` is not the equivalent to `$(brew --prefix nvm)/nvm.sh` since `BASH_IT_HOMEBREW_PREFIX` is set from `brew --prefix` instead of `brew --prefix nvm`.
pull/2162/head
Brian Phillips 2022-08-30 16:48:54 -05:00
parent e38696a0ac
commit 8eb90f7ac1
1 changed files with 2 additions and 2 deletions

View File

@ -10,9 +10,9 @@ about-plugin 'node version manager configuration'
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
# This loads nvm # This loads nvm
if _bash_it_homebrew_check && [[ -s "${BASH_IT_HOMEBREW_PREFIX}/nvm.sh" ]] if _bash_it_homebrew_check && [[ -s "$(brew --prefix nvm)/nvm.sh" ]]
then then
source "${BASH_IT_HOMEBREW_PREFIX}/nvm.sh" source "$(brew --prefix nvm)/nvm.sh"
else else
[[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" [[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
fi fi