Nvm: Support `lts/*` on Travis

Created on 23 Aug 2016  Â·  2Comments  Â·  Source: nvm-sh/nvm

Hello all the wonderful contributors of nvm! Thank you for all of your excellent work.

Recently @ljharb added the feature of being able to automatically use lts/<something> as an alias, e.g. nvm use lts/argon. This is really really cool, but as part of the discussion there was some talk about having travis support these kinds of aliases within a .travis.yml, e.g.:

node:
 - lts/argon
 - stable

As far as I know, travis just runs nvm install <yml.node[n]>. I think the coolest way to support this feature would be for nvm install to fall back to local aliases if ls-remote returns N/A, in other words:

Actual

$ nvm install lts/argon
Version 'lts/argon' not found - try `nvm ls-remote` to browse available versions.

Desired

$ nvm install lts/argon
Remote version 'lts/argon' found, falling back to local aliases
lts/argon -> 4.5
Downloading https://nodejs.org/dist/v4.5.0/node-v4.5.0-darwin-x64.tar.xz...
######################################################################## 100.0%
Now using node v4.5.0 (npm v2.15.9)
bugs feature requests installing node

Most helpful comment

Released in v0.31.5.

All 2 comments

I'm going to make it explicitly support lts/* and lts/foo rather than falling back on local aliases (since the local aliases don't exist until _after_ the first remote call is made). The effect will be the same.

Released in v0.31.5.

Was this page helpful?
0 / 5 - 0 ratings