microsoft / microsoft/winget-cli
`winget pin list` does not recognize package ID parameter
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
I am used to use package ID as the sole positional parameter for winget subcommands to specify the package I want to act on. For example, winget install Discord.Discord installs the package with that ID, winget uninstall Discord.Discord uninstalls it and winget list Discord.Discord lists the packages with that ID I have installed.
winget pin list is an outlier here, it does not seem to use the package ID parameter for anything.
Steps to reproduce
Precondition: Have some packages pinned. In my case have these:
> winget pin list
Name Id Version Source Pin type
----------------------------------------------------------------------------------------------------
Visual Studio Professional 2019 Microsoft.VisualStudio.2019.Professional 16.11.17 winget Gating
PowerShell 7-x64 Microsoft.PowerShell 7.2.1.0 winget Gating
CMake Kitware.CMake 3.22.2 winget Gating
VMware Workstation VMware.WorkstationPro 16.2.5 winget Blocking
Teams Machine-Wide Installer Microsoft.Teams 1.4.0.22472 winget Pinning
Discord Discord.Discord 1.0.9025 winget Pinning
- Try to check pin status of Discord with
winget pin list Discord.Discord
Expected behavior
See only pins for packages with ID Discord.Discord.
Actual behavior
I see all pinned packages:
> winget pin list Discord.Discord
Name Id Version Source Pin type
----------------------------------------------------------------------------------------------------
Visual Studio Professional 2019 Microsoft.VisualStudio.2019.Professional 16.11.17 winget Gating
PowerShell 7-x64 Microsoft.PowerShell 7.2.1.0 winget Gating
CMake Kitware.CMake 3.22.2 winget Gating
VMware Workstation VMware.WorkstationPro 16.2.5 winget Blocking
Teams Machine-Wide Installer Microsoft.Teams 1.4.0.22472 winget Pinning
Discord Discord.Discord 1.0.9025 winget Pinning
Environment
> winget --info
Windows Package Manager v1.7.10861
Windows: Windows.Desktop v10.0.22631.3374
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0
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 winget pin list Discord.Discord and trace the pin list command's positional-argument handling. Compare it with the package ID handling of the other winget subcommands described in the issue. Done means the command lists only the pin for the requested package ID while preserving the existing unfiltered listing.
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