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

Upgrade for Microsoft.Powershell not working

Open kathodion opened this issue 2 years ago • 8 comments

Command used

First attempt (Preview not installed though)

image

´´´ winget upgrade PowerShell Multiple installed packages found matching input criteria. Please refine the input. Name Id

PowerShell Microsoft.PowerShell PowerShell Microsoft.PowerShell.Preview ´´´

Second attempt

´´´ PS C:\Users\pascal.odermatt> winget upgrade --id Microsoft.PowerShell No applicable upgrade found. ´´´

Issue

´´´ No applicable upgrade found. ´´´

Output winget upgrade

´´´ PowerShell 7.2.8.0-x64 Microsoft.PowerShell 7.2.8.0 7.3.1.0 winget ´´´

kathodion avatar Jan 16 '23 06:01 kathodion

Try adding -e at the end to use an exact match winget upgrade --id Microsoft.Powershell -e

Trenly avatar Jan 16 '23 14:01 Trenly

Try adding -e at the end to use an exact match winget upgrade --id Microsoft.Powershell -e

does not help unfortunately ´´´ PS C:\Users\pascal.odermatt> winget upgrade --id Microsoft.Powershell -e No installed package found matching input criteria. ´´´

kathodion avatar Jan 16 '23 21:01 kathodion

Try adding -e at the end to use an exact match winget upgrade --id Microsoft.Powershell -e

does not help unfortunately ´´´ PS C:\Users\pascal.odermatt> winget upgrade --id Microsoft.Powershell -e No installed package found matching input criteria. ´´´

Are you able to post the logs from winget upgrade --id Microsoft.Powershell -e --verbose-logs ?

Trenly avatar Jan 16 '23 21:01 Trenly

does not help unfortunately

@kathodion: s in shell needs to be capitalized for it to work properly: image

So you will have to run winget upgrade --id Microsoft.PowerShell -e

ItzLevvie avatar Jan 16 '23 21:01 ItzLevvie

@kathodion: s in shell needs to be capitalized for it to work properly: image

So you will have to run winget upgrade --id Microsoft.PowerShell -e

It looks better. But on my main machine, there is no update now. I will try your idea and update the issue.

BTW nice colourful progress bar. How do you do that?

kathodion avatar Jan 17 '23 07:01 kathodion

The rainbow progress bar is a setting. winget settings --help will give a link to the settings page. I use Visual Studio Code as my default JSON editor so I get "help" modifying the file.

denelon avatar Jan 17 '23 18:01 denelon

does not help unfortunately

@kathodion: s in shell needs to be capitalized for it to work properly: image

So you will have to run winget upgrade --id Microsoft.PowerShell -e

image

did not help unfortunately. Any other idea?

kathodion avatar Feb 06 '23 07:02 kathodion

@kathodion,

PowerShell has both MSIX and MSI based installers. The Microsoft Store references the MSIX installer, and the winget community repository references the MSI installer (except for ARM64). They aren't able to "update" each other. The WinGet matching heuristics are also not quite able to get the right match in this case.

There was also a temporary issue where the winget manifest also included the MSIX installers.

In this case, I think the best bet is to uninstall and reinstall so winget is "back" in sync with your preferred source.

WinGet is going to need a bit more logic to have additional checks regarding the installer type for installed packages for this particular scenario.

denelon avatar Feb 06 '23 17:02 denelon