Coder Social home page Coder Social logo

Comments (8)

jasonkarns avatar jasonkarns commented on July 21, 2024
  1. Is this behavior unique to the version being set via env var? Or does it also occur when set via .node-version file?
  2. Is this behavior consistent with rbenv, of which we are a direct clone? If not, is it because we are behind rbenv upstream or because we're doing something differently?

(not meant specifically for you, @technicalpickles but just in general)

from nodenv.

jasonkarns avatar jasonkarns commented on July 21, 2024

#22 opened to accept with/without v prefix.

from nodenv.

technicalpickles avatar technicalpickles commented on July 21, 2024

Is this behavior unique to the version being set via env var? Or does it also occur when set via .node-version file?

Looks like it's only through the environment variable:

$ echo 'trololol' > .node-version
$ node --version
nodenv: version `trololol' is not installed
$ NODENV_VERSION=trololol node --version


^C

from nodenv.

jasonkarns avatar jasonkarns commented on July 21, 2024

@technicalpickles do you use rbenv? if so, can you replicate with rbenv?

from nodenv.

technicalpickles avatar technicalpickles commented on July 21, 2024

I do:

$ RBENV_VERSION=2.1.1 ruby --version
ruby 2.1.1p76-github (development) [x86_64-darwin13.0]

$ RBENV_VERSION=v2.1 ruby --version
rbenv: version `v2.1' is not installed
ruby 2.1.1p76-github (development) [x86_64-darwin13.0]

$ RBENV_VERSION=v2.1.1 ruby --version
rbenv: version `v2.1.1' is not installed
ruby 2.1.1p76-github (development) [x86_64-darwin13.0]

It looks like the behavior is to fallback to the default ruby.

from nodenv.

jasonkarns avatar jasonkarns commented on July 21, 2024

I've tried replicating with latest master: 6abd31a but can't replicated:

$ NODENV_VERSION=lol ./bin/nodenv exec node --version
nodenv: version `lol' is not installed

It doesn't seem to behave exactly as rbenv, because it emits an error and exits rather than falling back to system node.

Could you provide debug output? (NODENV_DEBUG=1)

from nodenv.

jasonkarns avatar jasonkarns commented on July 21, 2024

Also, I just recently merged latest updates from rbenv upstream. So kindly test against 7594630 if possible.

from nodenv.

technicalpickles avatar technicalpickles commented on July 21, 2024

@jasonkarns I've updated, and confirmed it working now. Thanks a ton!

$ NODENV_VERSION=0.8 node --version
v0.8.28
$ NODENV_VERSION=v0.8 node --version
v0.8.28

from nodenv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.