microsoft / microsoft/winget-cli

Unexpected package installed

Open
#5,185 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

When WinGet is determining which package to install it seems like the results are completely random sometimes.

Steps to reproduce

I'll use "dotnet" and "java" as examples here. Rather than using the WinGet install command, I'll reference "show" which performs the same kind of logic to determine which package should be installed. In the presence of more than one source like "winget" and "msstore" in the default configuration of WinGet.

winget show dotnet displays a package I wouldn't have expected while winget show dotnet -s winget requests disambiguation.

Image

Image

winget show java does the same thing.

Expected behavior

In both cases, with two or more sources, the results do not appear to be deterministic. If I specify the default "winget" source I'm asked to disambiguate.

I would expect WinGet to require me to disambiguate which package I intended to install when results for more than one source are evaluated and the results from either of those sources alone would require disambiguation.

Actual behavior

When more than one source is present, and one requires disambiguation for a term, I would expect to need to disambiguate even if one of the sources returns a single best match package.

Environment
winget --info
Windows Package Manager (Preview) v1.10.230-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.3037
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.230.0

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 winget show dotnet and winget show java with the default sources, then compare them with the same commands using -s winget. Use the reported WinGet version and environment as context; done means multi-source results consistently require disambiguation whenever either source cannot select a unique 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.