winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

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

Open sitiom opened this issue 1 year ago • 4 comments

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

sitiom avatar Aug 23 '24 03:08 sitiom

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Aug 23 '24 03:08 github-actions[bot]

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

uyriq avatar Aug 28 '24 14:08 uyriq

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.

denelon avatar Aug 28 '24 14:08 denelon

This is similar to:

  • #3994

denelon avatar Aug 28 '24 14:08 denelon

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

uyriq avatar Dec 01 '24 18:12 uyriq