Skip to content

Commit

Permalink
plugin/nvm: fix homebrew path
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelicWizard committed Feb 9, 2022
1 parent 394615b commit 1646e5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/available/nvm.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ about-plugin 'node version manager configuration'
export NVM_DIR

# shellcheck disable=SC1091 # This loads nvm
if _bash_it_homebrew_check && [[ -s "${BASH_IT_HOMEBREW_PREFIX?}/nvm.sh" ]]; then
source "${BASH_IT_HOMEBREW_PREFIX?}/nvm.sh"
if _bash_it_homebrew_check && [[ -s "${BASH_IT_HOMEBREW_PREFIX?}/opt/nvm/nvm.sh" ]]; then
mkdir -p "${NVM_DIR}"
source "${BASH_IT_HOMEBREW_PREFIX?}/opt/nvm/nvm.sh"
elif [[ -s "${NVM_DIR}/nvm.sh" ]]; then
source "${NVM_DIR}/nvm.sh"
fi

if ! _command_exists nvm; then
_log_warning "Bash-it no longer bundles the nvm script. Please install the latest version from
https://github.com/creationix/nvm.git"
https://github.com/creationix/nvm.git or Homebrew"
_log_warning "if you want to use nvm. You can keep this plugin enabled once you have installed nvm."
return 1
fi

0 comments on commit 1646e5c

Please sign in to comment.