-
-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[New] Print the version is going to be installed #1286
Conversation
Oops ... @ljharb do you have any suggestion about how to fix this? |
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.
The failing tests check install output - you'll need to add your new nvm_echo line to the expected output.
@@ -1581,6 +1581,7 @@ nvm_install_binary() { | |||
local TMPDIR | |||
local VERSION_PATH | |||
|
|||
nvm_echo "Start to download and install ${FLAVOR} ${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.
The flavor is for internal use - otherwise this will be iojs iojs-v1.0.0
for example. To properly handle flavors, you'd need an if/else, with one message for node, and another for io.js.
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.
Okay I'll fix it, thanks.
@ljharb thanks for your review, may I have some hints about the output part? Thanks again. |
@PeterDaveHello open the test files in question, look for the "EXPECTED_OUTPUT" variables, and add your new expected output |
@ljharb thank you so much! After tracing the code you mentions, it became much more clear, maybe we could also improve the expected and got error message to make it much more human readable in future 😄 |
6aeeced
to
7a34767
Compare
Should be good now, waiting for the CI test! |
@@ -1581,6 +1581,9 @@ nvm_install_binary() { | |||
local TMPDIR | |||
local VERSION_PATH | |||
|
|||
local NODE_OR_IOJS | |||
[ "${FLAVOR}" = "node" ] && NODE_OR_IOJS="${FLAVOR}" |
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.
if set -e
is set, won't this line error out?
I'd prefer a proper if
here.
@@ -1581,6 +1581,9 @@ nvm_install_binary() { | |||
local TMPDIR | |||
local VERSION_PATH | |||
|
|||
local NODE_OR_IOJS | |||
[ "${FLAVOR}" = "node" ] && NODE_OR_IOJS="${FLAVOR}" | |||
nvm_echo "Start to download and install ${NODE_OR_IOJS} ${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.
to avoid errors at referencing unset variables, this needs to be ${NODE_OR_IOJS-}
(note the dash)
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.
Also, while we're making changes, let's have this copy be "Downloading and installing ${NODE_OR_IOJS-} ${VERSION}..." :-)
7a34767
to
a5df6de
Compare
@ljharb all done! |
a5df6de
to
063353f
Compare
a5df6de
to
c4648dd
Compare
c4648dd
to
9c92b5a
Compare
For user experience enhancement/improvement
before:
after: