microsoft / microsoft/winget-cli
Update-WinGetPackage default behavior
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Update-WinGetPackage and Get-WinGetPackage entry points in the WinGet PowerShell module, focusing on the IsUpdateAvailable property and the current package iteration. Done means the default behavior attempts updates only for packages marked as having an update available and does not throw exceptions for packages without updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100