Skip to content

Update-WinGetPackage default behavior #3231

Open

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 Zafer Balkan (@zbalkan) in #3182 (comment)

Activity

  1. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    PowerShellIssue related to WinGet PowerShell Module or cmdlet
    and removed
    Needs-TriageIssue needs to be triaged
    on May 8, 2023
  2. added this to the milestone on Jun 5, 2023
  3. robinmalik commented on Sep 20, 2023

    @robinmalik

    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
  4. dodexahedron commented on Jun 7, 2024

    @dodexahedron

    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.

  5. removed this from the milestone on Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.PowerShellIssue related to WinGet PowerShell Module or cmdlet

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions