-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Include npm version when displaying results of switch. #722
Conversation
When running nvm use, successful changing of versions lists the new node version. The npm version may also be switched, but this is not listed. This commit updates nvm to display the npm version that was switched to alongside the node version
Not a bad idea at all! This will definitely fail tests, so please do update the relevant test files with the appropriate message. |
else | ||
echo "Now using node $VERSION" | ||
echo -n "Now using node $VERSION" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo -n
isn't supported in sh
(although it is supported in all other supported shells). Instead of using that, could we capture the npm version in a variable before the if/else, and interpolate that into a single echo
command?
Also, please do note that versions of |
* Update test string that checks printed node version to pass with additional npm version display * Remove echo -n for compatibility with shells that do not support it
I missed this in the tests and I didn't actually think to run the tests. Silly me. Fast tests pass for me. Slow tests do not pass on my system -- not even in the master branch (only the I tried in both I was also not able to install 0.2.2 to test lack of npm specifically. |
Not all the tests run reliably locally, so let's see how |
Sorry for the delay - this looks great, thanks! |
Include npm version when displaying results of switch.
When running nvm use, successful changing of versions lists the new node version. The npm version may also be switched, but this is not listed.
This commit updates nvm to display the npm version that was switched to alongside the node version