wbyoung / avn

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

nvm aliases not recognized #52

Closed duckontheweb closed 7 years ago

duckontheweb commented 7 years ago

Please describe your issue clearly and also include all details below.

Details

The output of __avn_debug in the directory with a .node-version file is:

avn could not activate node lts/boron
error: no plugin passed predicate
  avn-nvm: no version matching lts/boron

avn is loaded in my ~/.{bash|zsh}{_profile|rc} file with:

[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn

nvm specific

I was under the impression (based on the fact that #43 had been closed) that nvm aliases like lts/boron were now supported by avn and/or avn-nvm. However, I have tried the following content in both a .nvmrc and a .node-version file and neither is picked up by avn:

lts/boron

The alias does seem to be working correctly with nvm:

jduckwor$ nvm use
Found '/Users/jduckwor/WorkRelated/managed_code/mvt-platform/mvt-image-backend/.nvmrc' with version <lts/boron>
Now using node v6.9.4 (npm v3.10.10)
wbyoung commented 7 years ago

Yeah, I'll just reopen #43… more details are over there. The original requester closed it, but I'm still happy to take a PR for it.

duckontheweb commented 7 years ago

Thanks @wbyoung. If I have some time I'll take a look at the code and see if it's something I can contribute to.