-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.Review - MaintainerThe PR/issue needs a review from the PowerShell repo MaintainersThe PR/issue needs a review from the PowerShell repo Maintainers
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Install a slightly older PowerShell like 7.4.
- Open a PowerShell instance using the freshly installed copy of PWSH. I was using the latest Windows Terminal.
- Run
winget update -i microsoft.powershell. - Note the installer wants open PWSH instances to be closed.
How do you close the instance of PWSH that's running the installer without closing the installer? It'd help if the installer could detect it's running by winget in PWSH. Then it could rerun itself so the PWSH instance could be closed.
Expected behavior
The installer should be able to upgrade itself smoothly even if it's being run by a PWSH that locks the executable it needs to replace.
Actual behavior
I've tried to close the terminal containing the PWSH instance running the installer. That closes the installer too. I then had to manually uninstall PWSH and install the new version with a fresh download from GitHub.
Error details
Environment data
PS C:\Users\willp> $PSVersionTable
Name Value
---- -----
PSVersion 7.5.5
PSEdition Core
GitCommitId 7.5.5
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
I'll try that if I remember next time PWSH needs to be updated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.Review - MaintainerThe PR/issue needs a review from the PowerShell repo MaintainersThe PR/issue needs a review from the PowerShell repo Maintainers