microsoft / microsoft/winget-cli
exit error code when winget gets unloaded
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 upgrade --all works as expected yet after the process winget throws
NativeCommandExitException: Program "winget.exe" ended with non-zero exit code: -1978335188.
this also happens with other commands such as winget --help, -so not related to a specific command-, rather when winget gets unloaded
edit: it will happen after upgrade when the error has happened once. for fresh call it won't happen
Steps to reproduce
run Microsoft Terminal, PowerShell 7.4.0-preview.4
winget upgrade --all
Expected behavior
no error code after upgrade process has finished
Actual behavior
Environment
Windows: Windows.Desktop v10.0.22631.2115
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.21.1573.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung https://aka.ms/winget-privacy
Lizenzvereinbarung https://aka.ms/winget-license
Hinweise von Drittanbietern https://aka.ms/winget-3rdPartyNotice
Startseite https://aka.ms/winget
Windows Store-Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale
Administratoreinstellung Status
-----------------------------------------------------
LocalManifestFiles Deaktiviert
BypassCertificatePinningForMicrosoftStore Deaktiviert
InstallerHashOverride Deaktiviert
LocalArchiveMalwareScanOverride Deaktiviert
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 behavior in Microsoft Terminal with PowerShell 7.4.0-preview.4 using winget upgrade --all, then compare subsequent winget --help and other command exit codes. Trace the winget process-unload and exit-code handling to determine why the non-zero code appears after the first failure; done means these commands finish without the reported NativeCommandExitException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100