microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.37k stars 1.45k forks source link

Upgrade same package twice #4848

Open ewanm89 opened 1 month ago

ewanm89 commented 1 month ago

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
similar-issues-ai[bot] commented 1 month ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

ewanm89 commented 1 month ago

In regards to the duplicate the bot has found, that is a previous similar bug where the search terms is exactly the same twice. Here it is doing the fuzzy match and the exact ID match basically using different search input to get the same package each time.