unexpected behaviour - Installation abandoned
Brief description of your issue
upgrading PowerShell might take longer as expected. Winget causes to terminate with "Installation abandoned"
Steps to reproduce
- Have a previous version of PowerShell 7 installed, e.g. 7.1.0
- winget install powershell to upgrade to the latest version
- watch the output
Expected behavior
Winget should wait for the msi processes to end and check logs for exit / error codes
Actual behavior
winget is prematurely exiting with "Installation abandoned" while the uninstall / installation is still running and was overly successful.

Logs
MSI (s) (54:48) [10:46:37:555]: Product: PowerShell 7-x64 -- Installation completed successfully.
MSI (s) (54:48) [10:46:37:556]: Das Produkt wurde durch Windows Installer installiert. Produktname: PowerShell 7-x64. Produktversion: 7.1.1.0. Produktsprache: 1033. Hersteller: Microsoft Corporation. Erfolg- bzw. Fehlerstatus der Installation: 0. WinGet-2021-1-22-10-44-54.016.log WinGet-Microsoft.PowerShell.7.1.1-2021-1-22-10-45-17.287.log
Environment
Win10 Insider Dev Powershell 7
Windows Package Manager v0.2.3162 Vorschau Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
Windows: Windows.Desktop v10.0.21296.1000 Paket: Microsoft.DesktopAppInstaller v1.11.3162.0
Any other software? nothing specific. AV: Windows Defender System protection turned off
We see this when the shell we're executing in resets itself. We are looking at solutions.
Thanks for this info Demetrius!
We will need to add another key to manifests indicating the installation or upgrade of this application could cause a "restart" of your shell/terminal. MSIX has a delayed registration process that could also be triggered with this same key.
I'm converting this "Bug" into a "Feature" to capture this request.
We could offer a message like: "Installer known to restart shell or terminal. The install may succeed unless you aborted the installation."
The descriptive text for the key could be: "This installer sends abort signal ([Ctrl]+[c]) to current terminal."
How about:
Installers:
- Architecture: x64
InstallerUrl: https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/PowerShell-7.1.3-win-x64.msi
InstallerType: msi
InstallerSha256: 459642D8B6D69F643794DF8394F28191F43E5ED35472899C4F0D8424F6D1317C
InstallerAbortsTerminal: true
https://github.com/microsoft/winget-cli/blob/5a97e26ba3efb6b1f0d5997ec9de7d16b8fa52b9/schemas/JSON/manifests/v1.1.0/manifest.installer.1.1.0.json#L354-L357