microsoft / microsoft/winget-cli
Certain winget packages that are found by `Get-WinGetPackage` are not returned by `Get-WinGetPackage -Id`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Relevant area(s)
PowerShell Module
Relevant command(s)
No response
Brief description of your issue
There seem to be certain installed winget packages that are correctly listed in the output of a simple Get-WinGetPackage command, but if I check for those same packages with a specifically targeted Get-WinGetPackage -Id 'The.Package.Id' command, it returns nothing.
Steps to reproduce
Run this one-liner in PowerShell 7:
Get-WinGetPackage |? Source -EQ 'winget' |% { (Get-WinGetPackage -Id $_.Id -MatchOption Equals) ? $null : $_ }
Expected behavior
No output, ever.
First this gets all installed winget packages, then it tries to get each discovered package again by its exact ID, and outputs any packages that were found the first time but not the second. This should not be possible, so there should never be any output.
Actual behavior
Output on my machine:
Name Id Version Available Source
---- -- ------- --------- ------
PeaZip Giorgiotani.Peazip 10.5.0 11.0.0 winget
PowerShell Microsoft.PowerShell 7.5.5.0 winget
Environment
Windows Package Manager v1.28.220
Windows: Windows.Desktop v10.0.26200.8246
Package: Microsoft.DesktopAppInstaller v1.28.220.0
All testing carried out in PowerShell 7.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the one-liner in PowerShell 7 against the reported Windows Package Manager environment, then compare the results of Get-WinGetPackage with exact -Id lookups. Done means every package returned from the winget source by the unfiltered command is also returned by its exact ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100