microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.97k stars 1.43k forks source link

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

Open sitiom opened 3 weeks ago

sitiom commented 3 weeks ago

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.
  3. 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
github-actions[bot] commented 3 weeks ago

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.

uyriq commented 2 weeks ago

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

denelon commented 2 weeks ago

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 commented 2 weeks ago

This is similar to: