From b5564c47202e1d092de892a8430442ef6712d1b2 Mon Sep 17 00:00:00 2001 From: jon Date: Wed, 22 Jul 2026 14:53:32 -0500 Subject: [PATCH] style(install-windows): filter winget's spinner frames out of the log Piping winget to Out-Host defeats its carriage-return redraw, so every spinner and progress-bar frame lands as its own line. Filters the frames, keeps the messages. Block characters spelled by code point to keep the file ASCII. Co-Authored-By: Claude Opus 4.8 --- install-windows.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install-windows.ps1 b/install-windows.ps1 index 6dad9cc..269d1c8 100644 --- a/install-windows.ps1 +++ b/install-windows.ps1 @@ -43,8 +43,17 @@ function Update-SessionPath { function Install-Winget { param([string]$Id, [string]$Label) Write-Step "Installing $Label" + # winget animates a spinner ("-\|/") and a block progress bar using carriage + # returns to redraw one line in place. Piping it defeats that: PowerShell + # splits on the CRs, so every frame arrives as its own line and the log fills + # with dozens of lone dashes and bar snapshots. Drop the frames and keep the + # sentences. The block characters are spelled by code point because every + # .ps1 here must stay ASCII (tests/test_smoke.py enforces it). + $bar = "$([char]0x2588)$([char]0x2592)" winget install --id $Id -e --source winget ` - --accept-package-agreements --accept-source-agreements --disable-interactivity | Out-Host + --accept-package-agreements --accept-source-agreements --disable-interactivity | + Where-Object { $_ -notmatch "[$bar]" -and $_ -notmatch '^\s*[-\\|/]\s*$' -and $_.Trim() } | + Out-Host # winget returns non-zero when the package is already installed / up to date; # that's not a failure for us. Verify presence after refreshing PATH instead. Update-SessionPath