microsoft / microsoft/winget-cli

Upgrade same package twice

Open
#4,848 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Upgrade 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 upgrading packages (probably installing too, but not tested), if you list them twice on the command line but so the package is matched two different ways for example $ winget upgrade Brave Brave.Brave, it will download and install the same package upgrade twice:
image

Steps to reproduce

Upgrade package, list it twice where once is a partial name that will match and once is the full id.

Expected behavior

It to recognise that it is the same package twice and drop the duplicate from being downloaded and installed.

Actual behavior

It will download and install the package twice.

Environment
Windows Package Manager v1.8.1911
Windows: Windows.Desktop v10.0.19045.4780
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.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 the command-line case with winget upgrade Brave Brave.Brave and inspect the package matching and upgrade flow. Trace where matched packages are collected before downloads begin. Done means the same package is downloaded and installed only once when it is specified through multiple matching forms; the issue also mentions installation as a possible related case.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.