-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Relevant area(s)
WinGet CLI
Relevant command(s)
winget list, winget export, winget upgrade
Brief description of your issue
Winget commands (list, upgrade, export) produce corrupted JSON on Windows 11 due to spinner/progress frames being written into stdout. This breaks JSON parsing, automation, and export workflows
Steps to reproduce
-
Open PowerShell (elevated or non‑elevated).
-
Run any of the following commands:
winget list
winget upgrade
winget export -o test.json -
Observe that spinner/progress animation frames are written into stdout.
-
Attempt to parse the output, for example:
winget list | ConvertFrom-Json
-
Parsing fails because the output contains spinner frames, stray characters, and invalid JSON.
Expected behavior
Winget should produce clean, valid, machine‑readable JSON with no spinner/progress frames or UI elements in stdout.
When JSON output is requested, only JSON should be emitted.
Redirection should work without requiring -o, and --disable-interactivity should fully suppress all UI output.
Automation and parsing should succeed without errors.
Actual behavior
Winget outputs corrupted, non‑machine‑readable JSON. Spinner/progress animation frames, stray characters, and partial ANSI sequences are written into stdout even when JSON output is requested.
Commands such as list, upgrade, and export produce mixed UI/JSON output that cannot be parsed.
winget export also requires -o even when redirecting, and --disable-interactivity does not suppress UI elements.
Automation and JSON parsing fail as a result.
Environment
Windows Package Manager v1.12.470
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26200.7840
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.27.470.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
Installer Downloads %USERPROFILE%\Downloads
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled