Add DisplayVersion for rustup to registry on Windows. #3047
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! I'm a contributor to the Windows Package Manager Community Repository (microsoft/winget-pkgs), and we recently had an issue posted to that repo which revealed that Rustup was not publishing a
DisplayVersion
to Add and Remove Programs during its install (although it was posting itsDisplayName
).The
DisplayVersion
is how winget and other tools determine when updates to software are needed, so it is highly recommended to set it whenever possible. This PR does just that, by making it so when Rustup is installed, it adds its version number to the registry alongside its name.This is the most Rust I've ever written, so let me know if I did something wrong and I can fix it :)
Tested: manually by compiling a new version of Rustup and installing it in a VM. If this needs more strenuous tests, I'm happy to oblige.
Resolves: #3055