-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
nvm install xx should install latest minor version (xx.*) with this major number #596
Comments
It seems that this should be the case already but isn't working properly. I installed Node 14 using Lines 193 to 199 in 0619023
If I read the code correctly it seems that in case of Within Lines 628 to 644 in 0619023
I'm still in doubt whether this behavior is desired at all. If an end-user specifies both the major and minor version it (in my opinion) should still get the latest patch version. So... Is the conditional which is there at the moment even necessary? Please let me know if I misinterpreted something, either in the description of the issue or the code! |
I should've looked through other issues before commenting. I believe this to be a duplicate of #156, which describes the same behavior within it. |
There are module semver inside nvmw https://github.com/coreybutler/nvm-windows/blob/master/src/nvm/semver/semver.go#L184 but it seems is able to parse only full version: // Split into major.minor.(patch+pr+meta)
parts := strings.SplitN(s, ".", 3)
if len(parts) != 3 {
return nil, errors.New("No Major.Minor.Patch elements found")
} IDK, perhap package Masterminds/semver could be used? It's But actually changing len with regex should do the work too. Regarding #156 -- it seems reporting a crash if not full version is given, which is seems resolved. |
#156 was originally created for the crash you mentioned. Reading though I also see talk about whether |
Closing as a duplicate. |
When I run
nvm install 10
it downloads 10.0.0 version instead of downloading latest 10.*.Expected behavior: download 10.23.0
Current behavior: download 10.0.0
and downloading 0 releases from major would have lots of bugs.
This isn't logical and this controversy with UNIX nvm behavior
Linx NVM is working correctly with semver
The text was updated successfully, but these errors were encountered: