wbyoung / avn

Automatic Version Switching for Node
MIT License
1.14k stars 54 forks source link

Very simple line to add for full brew support on macOS (possible README.md add) #83

Closed kickthedragon closed 5 years ago

kickthedragon commented 5 years ago

For brew to work with avn theres just two very simple edits you need to make to your .bash profile

when you install nvm via brew it adds these two lines to the top of your .bash_profile

NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh

if you export the NVM_DIR variable and create a symlink to the brew nvm.sh location avn works entirely as expected.

export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
ln -sf $(brew --prefix nvm)/nvm.sh $NVM_DIR/nvm.sh 
ljharb commented 5 years ago

nvm is explicitly not supported via homebrew; please don't encourage people to install it that way.

wbyoung commented 5 years ago

I understand the desire for this to work, but I don't think it's a good idea to try to support something that an upstream project doesn't support.