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

Use version specified in .node-version if exists #288

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

whi-tw
Copy link
Contributor

@whi-tw whi-tw commented Oct 12, 2021

What

It's pretty common to have a file .node-version in a repo to specify the version of node to use.
This will pick up the version specified in this file and use that as the default when Config is initialised.

How to review

0. Create an empty directory

1. No Arguments, no .node-version file

  1. Create a node env nodeenv noargs
  2. Check that the installed version in noargs is latest

2. No Arguments, .node-version file

  1. Create a .node-version file (echo "14.17.1" > .node-version)
  2. Create a node-env nodeenv node-version
  3. Check that the installed version in node-version is 14.17.1

3. Version specified, .node-version file

  1. Create a node-env nodeenv node-version-with-args -n 16.9.0
  2. Check that the installed version in node-version-with-args is 16.9.0

@whi-tw
Copy link
Contributor Author

whi-tw commented Oct 12, 2021

Just spotted this has ridiculous formatting changes. Will sort that out.

edit: sorted.

It's pretty common to have a file `.node-version` in a repo to specify
the version of node to use.

This will pick up the version specified in this file and use that as
the default when `Config` is initialised.
@ekalinin ekalinin merged commit b9b1764 into ekalinin:master Nov 12, 2021
@whi-tw whi-tw deleted the use_node-version_version branch November 12, 2021 21:57
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

Successfully merging this pull request may close these issues.

2 participants