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

Install version from .nvmrc #1

Open
dtothefp opened this issue Sep 24, 2019 · 7 comments
Open

Install version from .nvmrc #1

dtothefp opened this issue Sep 24, 2019 · 7 comments

Comments

@dtothefp
Copy link

I'm new to GH actions and migrating from Travis. In Travis is .nvmrc is present that version will be used. Would it be possible to make this action respect the version in .nvmrc and omit the node-version argument?

@dcodeIO
Copy link
Owner

dcodeIO commented Sep 24, 2019

Should be possible. Maybe specifying node-version: "" already does the trick, or alternatively the default can be made an empty string with the install script skipping the explicit version setup.

@atifsyedali
Copy link

atifsyedali commented Nov 5, 2019

If you specify empty string, it installs the node version from the .nvmrc file in this repository...

Found '/home/runner/work/_actions/dcodeIO/setup-node-nvm/master/.nvmrc' with version <12.9.0>
Downloading https://nodejs.org/dist//v12.9.0/node-v12.9.0-linux-x64.tar.xz...
Downloading and installing node v12.9.0...

(I had 10.16.3 in my .nvmrc file)

@mrmanc
Copy link

mrmanc commented Jan 17, 2020

This would be really useful, but I’m not just posting a comment to ask for that feature. I wanted to suggest that in the meantime, it would be a good idea to change

description: The node.js version to use according to nvm. Uses the version specified in .nvmrc if omitted.
. As far as I can see it doesn’t accurately describe what the action does, as it doesn’t pick up the .nvmrc file.

@dcodeIO
Copy link
Owner

dcodeIO commented Jan 17, 2020

Hmm, I thought 3fca218 would make it work. It essentially uses an empty node version by default, which should make nvm look up from .nvmrc. There's also a simple test verifying this, picking up the version in the repo's .nvmrc. Do you have any ideas why it's not working in your use case?

@mrmanc
Copy link

mrmanc commented Jan 17, 2020

Thanks for your reply 😃Ah, in that case ignore my comment! My particular case doesn’t work because I need to specify a working directory and there’s no mechanism to do that in GitHub Actions, but I assumed that point was moot as I found this issue still open. Would you say this issue should be resolved then?

@dtothefp
Copy link
Author

This is definitely not resolved IMO. You can see my PR where it is working

https://github.com/dcodeIO/setup-node-nvm/pull/2/files

@garfieldnate
Copy link

This doesn't work at all, and it would be great to at least change the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants