[Fix] nvm exec: Do a version check on nvm-exec#3308
Conversation
This check would display a message in case the `.nvmrc` version is not installed, and would not alter the output otherwise.
c6cfc3a to
c20db2a
Compare
|
A test case was added that checks if the message printed out contains the relevant information (different version of node). |
ljharb
left a comment
There was a problem hiding this comment.
Thanks! (I'm going to tweak the test to be "fast" instead of "slow", and to use a "never can exist" version instead of needing to remove a version, but otherwise this is great!)
nvm-execnvm exec: Do a version check on nvm-exec
50480e4 to
05feeaa
Compare
|
Unfortunately there's 10 tests failing. It's possible it's just that the expected output needs to be updated to reflect the change, but I might not have time to work on it soon, so it'd be great if you could take a look :-) |
|
Gave it a quick look. Also saw that the version color printing test was failing, and went ahead and updated it. Currently staying on 7 errors when running in the docker container, but all other failures seem unrelated to the current changes and a bit more time consuming to debug. |
There was a problem hiding this comment.
aha, good catch. note tho that this doesn't actually restore what might already be present - we should back up and restore the existing .nvmrc in setup/teardown files
i'll take a crack at this part tho
test/fast/Running 'nvm-exec' should display required node version
Outdated
Show resolved
Hide resolved
8e1135f to
01a8749
Compare
|
k, rebased this, and updated |
This check would display a message in case the
.nvmrcversion is not installed, and would not alter the output otherwise.nvm_ensure_version_installedreturns the message that we care for.It requires an argument (version) against which to do the check, which we get after calling
nvm_rc_versionFixes #1769