rustup icon indicating copy to clipboard operation
rustup copied to clipboard

Register Rustup version in Windows registry for add/remove programs

Open LeonarddeR opened this issue 3 years ago • 1 comments

Problem you are trying to solve

In the windows add/remove programs (or apps and features) screen, the version of Rustup isn't registered. This can be pointed to the following block of code:

https://github.com/rust-lang/rustup/blob/6bc5d2c340e1dd9880b68564a19f0dea384c849c/src/cli/self_update/windows.rs#L526-L531

This makes it impossible for the Windows Package Manager CLI (aka winget) to detect updates:

winget upgrade --include-unknown                                                          
Name                                 Id              Version Available Source                                           
-----------------------------------------------------------------------------                                           
Rustup: the Rust toolchain installer Rustlang.Rustup Unknown 1.25.5    winget                                           
1 upgrades available.                                                                                                   

Solution you'd like

Add the DisplayVersion string to the registry containing the rustup version (e.g. 1.25.1

Notes

Note that the commit hash should be left out from the DisplayVersion as it is a hash and doesn't have a particular order.

LeonarddeR avatar Aug 02 '22 06:08 LeonarddeR

Turns out that there's a pr for this: #3047

LeonarddeR avatar Aug 02 '22 06:08 LeonarddeR

@kinnison When will a new version be released to use it?

gotounix avatar Oct 19 '22 02:10 gotounix