Invoke-WebRequest renders a progress bar by default. On PowerShell 7 the progress rendering is much faster than on 5.1, but for large downloads the per-byte progress update still measurably slows the transfer — especially in non-interactive hosts (CI, terminals without ANSI support) where the rendering cost is highest and the progress bar has no value.
Install-NerdFont downloads tens of megabytes per font and dozens of fonts in an -All run, so the cumulative overhead is significant.
Request
Current experience
Invoke-WebRequest -Uri $URL -OutFile $downloadPath -RetryIntervalSec 5 -MaximumRetryCount 5
The progress bar updates frequently during each download. In automated/CI scenarios it produces no visible value and slows the transfer.
Desired experience
Downloads complete as fast as the network allows, with no progress-bar overhead inside the function. Per-font progress is still reported via the existing Write-Verbose messages, which is sufficient for user feedback.
Acceptance criteria
- The progress bar is not rendered while
Install-NerdFont is downloading
- The user's ambient
$ProgressPreference is restored after the function exits
- No change in correctness — retries and error handling continue to work
- Verbose /
-WhatIf output is unchanged
Related
Technical decisions
Mechanism: Save and restore $ProgressPreference around the download phase rather than overriding it globally. This avoids leaking the override into the caller's session.
Scope: Apply the suppression only around the network calls, not around the whole function, so any future progress output the function emits itself is still visible.
Alternative considered: Switch to System.Net.Http.HttpClient — faster still, but a larger change. Tracked as a separate issue; this issue is the cheap win.
Implementation plan
Invoke-WebRequestrenders a progress bar by default. On PowerShell 7 the progress rendering is much faster than on 5.1, but for large downloads the per-byte progress update still measurably slows the transfer — especially in non-interactive hosts (CI, terminals without ANSI support) where the rendering cost is highest and the progress bar has no value.Install-NerdFontdownloads tens of megabytes per font and dozens of fonts in an-Allrun, so the cumulative overhead is significant.Request
Current experience
The progress bar updates frequently during each download. In automated/CI scenarios it produces no visible value and slows the transfer.
Desired experience
Downloads complete as fast as the network allows, with no progress-bar overhead inside the function. Per-font progress is still reported via the existing
Write-Verbosemessages, which is sufficient for user feedback.Acceptance criteria
Install-NerdFontis downloading$ProgressPreferenceis restored after the function exits-WhatIfoutput is unchangedRelated
Invoke-WebRequestprogressTechnical decisions
Mechanism: Save and restore
$ProgressPreferencearound the download phase rather than overriding it globally. This avoids leaking the override into the caller's session.Scope: Apply the suppression only around the network calls, not around the whole function, so any future progress output the function emits itself is still visible.
Alternative considered: Switch to
System.Net.Http.HttpClient— faster still, but a larger change. Tracked as a separate issue; this issue is the cheap win.Implementation plan
src/functions/public/Install-NerdFont.ps1, wrap theInvoke-WebRequestcall in atry { $oldPref = $ProgressPreference; $ProgressPreference = 'SilentlyContinue'; ... } finally { $ProgressPreference = $oldPref }block (or equivalent)-Verboseoutput is unaffected