microsoft / microsoft/winget-cli

Winget -e incorrectly matches items

Open
#2,142 1 comment 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

Winget is incorrectly matching items when using the -e switch.

Steps to reproduce

Install a package (Such as Visual C++ 2013 x86) using the following command:
winget install -e --id Microsoft.VC++2013Redist-x64 --scope machine --accept-source-agreements --accept-package-agreements

Verify it is installed by running
winget list c++

Winget will correctly list that it is installed by showing this:
Name Id Version Source

Microsoft Visual C++ 2013 Redistributable (x64) Microsoft.VC++2013Redist-x64 12.0.40664.0 winget
(note, only the x64 version is installed)

Then check if the X86 version is installed explicitly with this command
winget list -e --id "Microsoft.VC++2013Redist-x86" --accept-source-agreements

Winget will incorrectly now state that the x86 version is installed
Name Id Version Source

Microsoft Visual C++ 2013 Redistributable (x86) Microsoft.VC++2013Redist-x86 12.0.40664.0 winget

Expected behavior

Winget should NOT detect the x86 version when it is not installed when running with the -e --id command lines

Actual behavior

Winget will incorrectly now state that the x86 version is installed
Name Id Version Source

Microsoft Visual C++ 2013 Redistributable (x86) Microsoft.VC++2013Redist-x86 12.0.40664.0 winget

Environment
Windows Package Manager v1.2.10271

This happens with many versions of the C++ software but may also affect other applications as well.

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 in the issue on Windows: install Microsoft.VC++2013Redist-x64, then run winget list -e --id "Microsoft.VC++2013Redist-x86". Trace the exact-match behavior used by winget list; done means the uninstalled x86 package is no longer reported while the installed x64 package remains detectable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.