Nvm: When NVM_DIR is a symlink, `nvm_ls` breaks

Created on 19 Jan 2015  路  2Comments  路  Source: nvm-sh/nvm

Per some of the discussion on here: https://github.com/creationix/nvm/pull/616#issuecomment-70540684 as reported by @patrick-steele-idem

Solution is to add -L to the find command inside nvm_ls. The tricky part is writing a test for it :-)

bugs pull request wanted testing

Most helpful comment

Temporary workaround, in .zprofile (or .zshrc, if you prefer):

 # you can use the real path instead of the command f you prefer
export NVM_DIR="$(realpath $HOME/.nvm)"   
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

All 2 comments

This seems to also be causing some of the issues incorrectly reported on #855.

Temporary workaround, in .zprofile (or .zshrc, if you prefer):

 # you can use the real path instead of the command f you prefer
export NVM_DIR="$(realpath $HOME/.nvm)"   
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
Was this page helpful?
0 / 5 - 0 ratings