microsoft / microsoft/winget-cli
Check whether the executable is running before uninstalling or upgrading portable package
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
WinGet doesn't check whether the executable is running before uninstalling or upgrading portable package, which would cause unexpected errors while WinGet is removing old executable.
Steps to reproduce
- Run
winget install Tencent.COSCLI. - Run
coscliand leave it in the background. - Run
winget uninstall Tencent.COSCLI. WinGet will report errors.
Expected behavior
Report that the portable package to be uninstalled or upgraded is running.
Actual behavior
Errors occured while WinGet is removing old executable.
❯ winget uninstall COSCLI
已找到 COSCLI [Tencent.COSCLI]
正在启动程序包卸载...
执行此命令时发生意外错误:
remove: �ܾ����ʡ�: "C:\Users\SpecterShell\AppData\Local\Microsoft\WinGet\Packages\Tencent.COSCLI_Microsoft.Winget.Source_8wekyb3d8bbwe\coscli-windows.exe"
卸载失败,退出代码为: 0x8a150003 : Executing command failed
Environment
Windows 程序包管理器(预览) v1.4.2161-preview
版权所有 (C) Microsoft Corporation。保留所有权利。
Windows: Windows.Desktop v10.0.22621.608
系统体系结构: X64
程序包: Microsoft.DesktopAppInstaller v1.19.2161.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with winget install Tencent.COSCLI, a background coscli process, and winget uninstall Tencent.COSCLI. Trace the portable-package uninstall and upgrade handling from the CLI command entry point. Done means WinGet detects the running executable and reports that condition instead of returning a removal error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100