microsoft / microsoft/winget-cli

Winget shows wrong package id with name

Open
#3,072 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Matching Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

I'm dependent on winget to list the version numbers of a package for me, right now Python.

When I use winget list it shows me all the Python versions installed, however I need to know if an exact version of Python has been installed as well, hence the use of winget list -e. (ps. the issue also already persists in the winget list as shown below)
image

This however returns an unexpected result:
image

Instead of getting the message: No installed package found matching input criteria. I am now dumbfounded with a python 2.7.14 having an Id of Python.Python.3.9

Steps to reproduce
  1. run: winget install --id=Python.Python.2 -e
  2. run: winget list --id=Python.Python.3.9 -e
Expected behavior

return:

Name                   Id                 Version    Available Source
---------------------------------------------------------------------
Python 2.7.14 (64-bit) Python.Python.2 < 3.12.0a1 3.12.0a5  winget
Actual behavior

return

Name                   Id                Version Available Source
-----------------------------------------------------------------
Python 2.7.14 (64-bit) Python.Python.3.9 < 3.9.0 3.9.13    winget
Environment
Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.1574
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two commands from the issue on the stated Windows Package Manager version and compare the reported package ID with the installed package. Trace the list command's exact-ID matching and package metadata lookup; done means an exact search for Python.Python.3.9 no longer reports the installed Python 2.7.14 package.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.