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