Skip to content
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

nodist latest not downloading latest #172

Closed
nwayve opened this issue Oct 11, 2016 · 6 comments
Closed

nodist latest not downloading latest #172

nwayve opened this issue Oct 11, 2016 · 6 comments

Comments

@nwayve
Copy link

nwayve commented Oct 11, 2016

nodist -v
0.8.6

nodist --help
...
    nodist latest                   Use the latest available node version globally
                                    (downloads the executable, if necessary).
...

nodist dist
0.1.14
...
6.6.0
6.7.0

nodist
(x64)
> 6.6.0  (global: latest)

nodist latest
latest

nodist
(x64)
> 6.6.0  (global: latest)

6.7.0 is the latest version available but it seems like it's just pointing to the latest version that's installed.
I can do nodist + latest to get the latest installed and referenced.

@marcelklehr
Copy link
Member

Nice catch! The question here is whether (disregarding the help message) it is more intuitive to expect nodist latest to download the really latest version, or just set the latest downloaded version. I think the way it is, is consistent with the rest of nodist's CLI. Thus this would be a bug in the help message. I'm open to other solutions, though.

@nwayve
Copy link
Author

nwayve commented Oct 11, 2016

nodist 6.7.0 and nodist + 6.7.0 both do the same thing, installs (if necessary), and points the global version to that. To be consistent in this behavior, I think nodist latest and nodist + latest should also do the same.

@marcelklehr
Copy link
Member

Ahaa, 6.7.0 is different, though, as it's a full version spec, while latest is not. Its behavior should be consistent with wild card version specs, IMO. Take for example nodist 6.x, it checks if an installed version matches the spec and installs the latest matching one iff that is not the case, and sets the global node version to 6.x.

@marcelklehr
Copy link
Member

The rationale here is to make the life of people with slow network connections or none at all easier, by allowing them to set version specs without using the network (only if necessary, because there would be no matching version otherwise). People that want the latest version will have to do nodist + 6.x && nodist global 6.x

@nwayve
Copy link
Author

nwayve commented Oct 11, 2016

Ok, I'm understanding the behavior now. Took me a minute to grock but yeah, you're probably right about this being more of a bug in the documentation to understand what's going on.

Keeping the wording terse for the --help file is rather difficult but I've attached an updated version that might do the trick. Modify as necessary. I updated more than just the global reference pointer notes. Feel free to discard those suggestions.
usage.txt

@marcelklehr
Copy link
Member

Thank you! I've stripped out some things and replaced "reference" with "requirement" as I think that concept is closer to the way nodist works, since the version spec is evaluated lazily instead of setting a resolved version as a reference. I've created a pull request with the changes. Feel free to have a look at it and provide feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants