microsoft / microsoft/winget-cli

Update-WinGetPackage default behavior

Open
#3,231 2 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug PowerShell
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.