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

[Fix] nvm install: show proper version in .nvmrc install instructions #2770

Merged

Conversation

deepakchethan
Copy link
Contributor

@deepakchethan deepakchethan commented Mar 22, 2022

We skip showing version only if we have .nvmrc with value and runs nvm use or nvm run. If nvm use v17 or nvm run v17 app.js is used we still show the version as seen in the screenshot:

nvm use:

Screen Shot 2022-03-22 at 8 17 57 PM

nvm run:

Screen Shot 2022-03-29 at 8 22 16 AM

Fixes #2701. Fixes #2775.

nvm.sh Outdated Show resolved Hide resolved
nvm.sh Outdated Show resolved Hide resolved
nvm.sh Outdated Show resolved Hide resolved
nvm.sh Outdated Show resolved Hide resolved
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! You added unit tests for nvm_ensure_version_installed, but no nvm run or nvm use tests that test the output when there's an .nvmrc that's not present. Can we add those?

@deepakchethan
Copy link
Contributor Author

This is great! You added unit tests for nvm_ensure_version_installed, but no nvm run or nvm use tests that test the output when there's an .nvmrc that's not present. Can we add those?

Sure @ljharb, will get right on it!

@deepakchethan
Copy link
Contributor Author

@ljharb, I have added test cases for nvm use but I feel like we have an issue with nvm run with .nvmrc. I have created an issue at #2775. I can fix this as well to throw a similar error to nvm use and add test cases for it.

Let me know if any other cases that needs to be covered. Thanks!

@deepakchethan deepakchethan force-pushed the feat/hide-version-info-nvm-use-with-nvmrc branch from 40e2f8d to 0d56b17 Compare March 29, 2022 02:55
@deepakchethan deepakchethan changed the title Feat: Hide version info for nvm use when version read from nvmrc Feat: Hide version info for nvm install instructions when version read from nvmrc Mar 29, 2022
@deepakchethan
Copy link
Contributor Author

Hello @ljharb, I have fixed the nvm run as well and added test cases for it. Please review it whenever you are free. Thanks!

nvm.sh Outdated Show resolved Hide resolved
nvm.sh Outdated Show resolved Hide resolved
@deepakchethan deepakchethan force-pushed the feat/hide-version-info-nvm-use-with-nvmrc branch from a3993c1 to 6bc56d4 Compare April 4, 2022 01:49
@deepakchethan
Copy link
Contributor Author

Hello @ljharb, I have made all the suggested changes. Please let me know if you need me to do some other changes. Thanks!

1 similar comment
@deepakchethan
Copy link
Contributor Author

Hello @ljharb, I have made all the suggested changes. Please let me know if you need me to do some other changes. Thanks!

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@ljharb ljharb changed the title Feat: Hide version info for nvm install instructions when version read from nvmrc [Fix] nvm install: show proper version in .nvmrc install instructions Apr 11, 2022
@ljharb ljharb force-pushed the feat/hide-version-info-nvm-use-with-nvmrc branch from d024482 to 9e884b8 Compare April 11, 2022 02:57
@ljharb ljharb merged commit 9e884b8 into nvm-sh:master Apr 11, 2022
@deepakchethan deepakchethan deleted the feat/hide-version-info-nvm-use-with-nvmrc branch April 11, 2022 08:11
@vegerot
Copy link

vegerot commented May 13, 2022

When will we release this?

@Joecliff8 Joecliff8 linked an issue May 15, 2022 that may be closed by this pull request
@ljharb
Copy link
Member

ljharb commented May 16, 2022

@vegerot a release is blocked on #2802.

@vegerot
Copy link

vegerot commented May 16, 2022

Python 2? Good luck!

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