microsoft / microsoft/winget-cli

winget upgrade can't upgrade powershell when ran from powershell

Open
#4,097 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Brief description of your issue

You cannot upgrade powershell using winget in powershell, the installer cannot proceed since PowerShell is open.

Steps to reproduce
  • Open PowerShell
  • winget upgrade -i Microsoft.PowerShell
  • Proceed through the installer
  • Installer asks to close PowerShell
  • Closing PowerShell exits the installer
Expected behavior

Expected the installer to complete in some fashion, regardless if I close my powershell session.

Actual behavior

Installer fails to proceed because powershell is running. You cannot close powershell or it will exit the installer.

Environment
Windows Package Manager v1.6.3482
Windows: Windows.Desktop v10.0.19045.3930
Package: Microsoft.DesktopAppInstaller v1.21.3482.0

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 reproducing the issue with winget upgrade -i Microsoft.PowerShell in Windows PowerShell using the reported WinGet and Windows versions. Trace the installer interaction when the active PowerShell session must be closed; done means the upgrade can complete without the installer exiting when that session closes.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.