Installed Package shows with 2 different ID's #5097
Labels
Command-List
Issue related to WinGet List
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Brief description of your issue
This issue was noticed when installing package
LGUG2Z.whkd
. If we search for this package with commandwinget search --id lgug2z.whkd
it shows the correct package. After installing the package it installs correctly and the app works fine, however there is something weird with the package ID.Depending on the command used to list packages it shows a different ID, it shows an ID of another package from the same developer. If we then try to install that other package it fails saying it is already installed.
If after installing I run command
winget list --id lgug2z.whkd
it shows this (which is correct):If instead I run the command
winget list -q lgug2z
orwinget list --id lgug2z
it shows this (which is not correct):There is another package from the same developer called
masir
which has the IDLGUG2Z.masir
and somehow winget thinks that thewhkd
package has both IDs. So if we now try to install themasir
package it won't be possible because it says that it is already installed (even though I've never installed it):The packages' manifests seem to be fine, each one has a different ID and a different
ProductCode
, there was an issue onmasir
version 0.1.0 which had the sameUpgradeCode
aswhkd
had. Thinking that this could be the cause of the issue, a new version ofmasir
(0.1.1) was released with a differentUpgradeCode
but the issue persists. Also from briefly looking at the code it doesn't seem that winget checks this upgrade code when it is searching for a single package so that shouldn't be an issue, it appears to check theProductCode
,ID
,Name
andMoniker
which are all different between these two packages...What else could be causing this confusion of IDs?
Steps to reproduce
winget install --id lgug2z.whkd
winget list --id lgug2z.whkd
(shows correct ID)winget list -q lgug2z
(shows wrong ID)winget install --id lgug2z.masir
(fails because it thinks it is already installed)Expected behavior
The ID should always be the one from the package manifest which in this case is
LGUG2z.whkd
. Winget shouldn't be changing or confusing this ID after install.Actual behavior
Winget shows different IDs depending on the command used. So some part of code that searches for a package is matching the wrong package and returning the wrong ID.
Environment
The text was updated successfully, but these errors were encountered: