Skip to content

winget upgrade for nvm is broken #876

Description

@remidebette

Issue:
Hi, thank you for the nice tool.

I am installing NVM for windows with winget, which is becoming the de facto tool for managing packages in Windows.

❯ winget install --id CoreyButler.NVMforWindows

My issue is that to this date I cannot seamlessly use the upgrade function of winget due to NVM for windows not been upgraded by the tool:

❯ winget upgrade --id CoreyButler.NVMforWindows
This package's version number cannot be determined. To upgrade it anyway, add the argument --include-unknown to your previous command.

Adding the --include-unknown parameter is not a good solution because I am never not in a state where the system is 'up to date'

You can see the main reason is that winget is unable to detect the current version of NVM for windows:

❯ winget upgrade --include-unknown
Name                                 Id                        Version Available Source
---------------------------------------------------------------------------------------
NVM for Windows                      CoreyButler.NVMforWindows Unknown 1.1.9     winget

Expected Behavior:
The actual version of the currently installed version should appear as so:

❯ winget upgrade --include-unknown
Name                                 Id                        Version Available Source
---------------------------------------------------------------------------------------
NVM for Windows                      CoreyButler.NVMforWindows 1.1.9   1.1.9     winget

Additional context:
As explained here: microsoft/winget-cli#1356
The version used by winget is simply the information provided from Control Panel
Apparently, all that is needed is to add a DisplayVersion key in the registry when installing.

See how the Control panel does not see the version:
image

Here is an example of a program with a version:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions