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

Update-WinGetPackage default behavior

Open denelon opened this issue 2 years ago • 2 comments
trafficstars

Capture The default behavior of the Update-WingetPackage looks wrong. It should not try to upgrade all packages but only the ones with update available. So it should be a a syntactic sugar for Get-WinGetPackage | Where-Object -Property IsUpdateAvailable -eq $true | ForEach-Object { Update-WinGetPackage -Id $_.ID } , not Get-WinGetPackage | ForEach-Object { Update-WinGetPackage -Id $_.ID }. Currently it gets all the packages and then throws an exception.

P.S: Excuse me for the bad redaction.

Originally posted by @zbalkan in https://github.com/microsoft/winget-cli/discussions/3182#discussioncomment-5839059

denelon avatar May 08 '23 15:05 denelon

I'll add to this re: "default behaviour". We should have an output that displays what has been updated (i.e. the name/id of the package in one of the columns). Currently it's like this:

image

robinmalik avatar Sep 20 '23 09:09 robinmalik

IMO it's actually better behavior than the winget cli itself has, as assuming * is how other package managers behave, so the existing behavior is something of a consistency win.

But being able to use at least the common properties as params to the Update-WinGetPackage cmtlet itself would also be excellent and avoid the need to pipe it, which is clunky.

Nobody pipes apt list --upgradable to grep and feeds the output to apt install, for example.

dodexahedron avatar Jun 07 '24 19:06 dodexahedron