microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.35k stars 1.45k forks source link

Move packages with "InstallerAbortsTerminal" to the end of the list for "upgrade --all" #4908

Open denelon opened 1 month ago

denelon commented 1 month ago

Description of the new feature / enhancement

When I run winget upgrade --all with a set of packages and PowerShell is in the middle of the list, WinGet doesn't finish installing the packages.

It appears the upgrade is killing the WinGet process when PowerShell gets upgraded (note MSIX packages get delayed registration). This is happening with the MSI version of the PowerShell installer.

The WinGet manifest schema has an "InstallerAbortsTerminal" property to try and warn users about the risk of the terminal being aborted for an upgrade, and that could be used in the case of PowerShell.

WinGet should sequence upgrades for packages with this property specified to the end of the list of packages to be upgraded.

Proposed technical implementation details

No response