microsoft / microsoft/winget-cli

PowerShell module doesn't cancel download & installation with Ctrl-C

Open
#4,961 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Brief description of your issue

When I press Ctrl + C, I expect that the package download & installation would be cancelled by PowerShell module. That is not the case as both continue silently in the background without user's knowledge. The svchost process continues to download the file and the module initiates the usual installation flow after the download finishes. Observe in the short 40sec video below (the video is sped up):

https://github.com/user-attachments/assets/945a8231-8851-4da3-8f07-34f043a65758

Steps to reproduce

Try an Upgrade-WinGetPackage command and press Ctrl + C when the package is being downloaded

Expected behavior

Package download and installation to be cancelled

Actual behavior

Download and installation continues as normal

Environment
~ Get-Module Microsoft.WinGet.Client | Select Version
Version
-------
1.9.25190

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 Upgrade-WinGetPackage and Ctrl-C while the package is downloading. Trace the PowerShell module's download and installation flow, including the svchost download process, to identify where cancellation is lost. Done means Ctrl-C stops both the download and the subsequent installation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.