winget-cli
winget-cli copied to clipboard
Check whether the executable is running before uninstalling or upgrading portable package
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