microsoft / microsoft/winget-cli

Upgrading `pnpm.pnpm` via the exact ID does not work

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

Nobody has claimed this yet.

Area-Matching 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

Upgrading pnpm.pnpm via the exact ID does not work

Steps to reproduce
  1. Install an old version of pnpm via Winget: winget install pnpm.pnpm -v 9.7.1
  2. Verify an upgrade is available
> winget upgrade
Name Id        Version Available
--------------------------------
pnpm pnpm.pnpm 9.7.1   9.8.0
1 upgrades available.
  1. 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

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 upgrade commands from the issue on the listed Windows Package Manager environment, comparing exact-ID resolution with the working moniker path. Trace the CLI's installed-package lookup and upgrade selection for pnpm.pnpm; done means winget upgrade --id pnpm.pnpm finds and upgrades the installed package.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.