Upgrading `pnpm.pnpm` via the exact ID does not work
Brief description of your issue
Upgrading pnpm.pnpm via the exact ID does not work
Steps to reproduce
- Install an old version of pnpm via Winget:
winget install pnpm.pnpm -v 9.7.1 - Verify an upgrade is available
> winget upgrade
Name Id Version Available
--------------------------------
pnpm pnpm.pnpm 9.7.1 9.8.0
1 upgrades available.
- Try installing with the exact ID:
> winget upgrade pnpm.pnpm
No installed package found matching input criteria.
> winget upgrade --id pnpm.pnpm
No installed package found matching input criteria.
> winget upgrade --id pnpm.pnpm -e
No installed package found matching input criteria.
Expected behavior
Upgrade with the exact ID (winget upgrade --id pnpm.pnpm) should work
Actual behavior
Upgrade with the exact ID (winget upgrade --id pnpm.pnpm) does not work. However, upgrading via the moniker does work:
> winget upgrade pnpm
Found pnpm [pnpm.pnpm] Version 9.8.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/pnpm/pnpm/releases/download/v9.8.0/pnpm-win-x64.exe
...
Environment
Windows Package Manager v1.8.1911
Windows: Windows.Desktop v10.0.26100.1457
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Closed similar issues:
- winget upgrade by id and by name not working for Microsoft Visual C++ 2015-2019 Redistributable (#1658), similarity score: 0.78
- Upgrading package by id error (#1829), similarity score: 0.77
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
This problem seems to have been around for a while, at least the good thing is that we can eventually update pnpm via the --name option.
➜ winget list --id pnpm.pnpm
Name Id Version Available Source
---------------------------------------
pnpm pnpm.pnpm 9.6.0 9.9.0 winget
➜ winget update --id pnpm.pnpm
No installed package found matching input criteria.
➜ winget upgrade --name pnpm
Found pnpm [pnpm.pnpm] Version 9.9.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/pnpm/pnpm/releases/download/v9.9.0/pnpm-win-x64.exe
This seems to be in the class of problems where more than one package has an identifier with the same root:
pnpm.pnpm and pnpm.pnpm.preview both exist in the community repository.
This is similar to:
- #3994
Just left a link to powershell script, that do update by --id or by --name if first attempt fails. i have wrote a readme too. https://gist.github.com/uyriq/daef5b7b3a1f6b3e169c3298812affcc