Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not read .nvmrc #684

Closed
ghost opened this issue Mar 4, 2015 · 4 comments
Closed

Does not read .nvmrc #684

ghost opened this issue Mar 4, 2015 · 4 comments
Assignees
Labels
bugs Oh no, something's broken :-(

Comments

@ghost
Copy link

ghost commented Mar 4, 2015

After some fiddling #682 fixed itself, but now .nvmrc is not getting read correctly so nmv use does not work as expected (switch to my preferred node's version).

Also, is there any official documentation for how .nvmrc should look like? Here is what I've got:

[user@server ~]$ cat .nvmrc
0.12.0
[user@server ~]$ 

Now, nvm does work if I type nvm use 0.12. MY current workaround is:

nvm use $NVM_RC_VERSION
@ljharb
Copy link
Member

ljharb commented Mar 4, 2015

A .nvmrc file can contain any X that would work with nvm use X, nvm install X, etc, so 0.12.0 or 0.12 should work just fine.

$NVM_RC_VERSION actually is only set during certain code paths, so it's not going to be reliable for you.

What happens when you run nvm use by itself? What's the output, and what's nvm current output afterwards?

@ghost
Copy link
Author

ghost commented Mar 4, 2015

So the exact contents of the .nvmrc could be:

0.12

Right?

When I use nvm use by itself, it fails like this:

Found '/{{$HOME}}/.nvmrc' with version <0.12.0>
N/A: version "" is not yet installed

@ljharb ljharb added the bugs Oh no, something's broken :-( label Mar 4, 2015
@ljharb ljharb self-assigned this Mar 4, 2015
@ljharb
Copy link
Member

ljharb commented Mar 4, 2015

Ah, I've just fixed that today with 8ae7a37 :-) It will be fixed in the next release.

@ljharb ljharb closed this as completed Mar 4, 2015
@ghost
Copy link
Author

ghost commented Mar 4, 2015

Thank you! It's fixed now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Oh no, something's broken :-(
Projects
None yet
Development

No branches or pull requests

1 participant