#1886: fix npm based commandlet shows wrong tool version#1900
#1886: fix npm based commandlet shows wrong tool version#1900AdemZarrouki wants to merge 13 commits into
Conversation
Coverage Report for CI Build 26214647811Coverage increased (+0.02%) to 70.972%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
areinicke
left a comment
There was a problem hiding this comment.
I have confirmed it works and the few lines of code you added look good. Nice job!
hohwille
left a comment
There was a problem hiding this comment.
@AdemZarrouki thanks for your PR. Great that you figured out why we have this bug 👍
I left a comment for a better place to fix it so it will not only be fixed for npm based tools but also for pip based tools.
| protected VersionIdentifier getInstalledVersion(Path toolPath) { | ||
| return computeInstalledVersion(); |
There was a problem hiding this comment.
great finding. You traced down the bug.
However, a better or more proper fix would be to override this method in PackageManagerBasedLocalToolCommandlet that only overrides the method without the argument:
There was a problem hiding this comment.
Thanks for the review @hohwille.
Yes your comment makes sense as i wasn't aware that the bug is also in pip based commandlets.
This PR fixes #1886
Implemented changes:
getInstalledVersioninNpmBasedCommandletto ignore thetoolPathparameter and use npm package manager to detect the actual installed version of the tool.Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal