Merge pull request #633 from kylev/kv_nvm_brew

Enable discovery and use of nvm installed via homebrew.
This commit is contained in:
Nils Winkler
2015-12-28 12:55:24 +01:00

View File

@@ -6,7 +6,13 @@ cite about-plugin
about-plugin 'node version manager configuration'
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# This loads nvm
if command -v brew &>/dev/null && [ -s $(brew --prefix nvm)/nvm.sh ]
then
. $(brew --prefix nvm)/nvm.sh
else
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
fi
if ! command -v nvm &>/dev/null
then