microsoft / microsoft/winget-cli

winget list --exact matches incorrectly for similar packages

Open
#3,994 4 comments 0 reactions 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

The package Id = CodecGuide.K-LiteCodecPack.Standard version 18.0.0 installs with name "K-Lite Codec Pack 18.0.0 Standard"

But when that package is installed, winget list indicates that each of:

  • CodecGuide.K-LiteCodecPack.Full
  • CodecGuide.K-LiteCodecPack.Basic
  • CodecGuide.K-LiteCodecPack.Mega
    are installed (when they are not) and with the name "K-Lite Codec Pack 18.0.0 Standard" (which these packages do not use).
Steps to reproduce
  1. run winget install --id CodecGuide.K-LiteCodecPack.Standard
  2. run winget list --exact CodecGuide.K-LiteCodecPack.Standard
  3. run winget list --exact CodecGuide.K-LiteCodecPack.Basic
  4. run winget list --exact CodecGuide.K-LiteCodecPack.Full
  5. run winget list --exact CodecGuide.K-LiteCodecPack.Mega
Expected behavior
  1. winget list --exact 'packageID' to show information only for the exact package in question
  2. winget list --exact 'packageID' to not display name information for other packages
Actual behavior

winget list --exact show that CodecGuide.K-LiteCodecPack.Standard, CodecGuide.K-LiteCodecPack.Basic, CodecGuide.K-LiteCodecPack.Full, and CodecGuide.K-LiteCodecPack.Mega are all installed with the "Standard" name.

$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Standard
Name                              Id                                  Version Source
-------------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Standard 18.0.0  winget
ash:/mnt/c/Users/USER/Desktop:(Local)$ echo $?
0
$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Basic

Name                              Id                               Version Source
----------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Basic 18.0.0  winget
$ echo $?
0
$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Full
Name                              Id                              Version Source
---------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Full 18.0.0  winget
$ echo $?
0
$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Mega
Name                              Id                              Version Source
---------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Mega 18.0.0  winget
$ echo $?
0
$

But winget list with no arguments shows that the Basic, Full, and Mega packages are not installed:

$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Standard
K-Lite Codec Pack 18.0.0 Standard        CodecGuide.K-LiteCodecPack.Standard      18.0.0                         winget
$ echo $?
0
$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Basic
$ echo $?
1
$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Full
$ echo $?
1
$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Mega
$ echo $?
1
$
Environment
$ winget.exe --info
Windows Package Manager v1.6.3421
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.3803
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3421.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

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

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

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

Reproduce the issue with the listed winget install and winget list --exact commands on the stated Windows environment, then compare each exact query with unfiltered winget list output. Trace the matching behavior behind the list command and verify that only the requested installed package is reported, with its own name and ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.