Skip to content

Commit 5ea9c30

Browse files
perf(#206): suppress download progress bar in Install-GoogleFont
1 parent 6c55b9b commit 5ea9c30

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/functions/public/Install-GoogleFont.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ Please run the command again with elevated rights (Run as Administrator) or prov
7777
'@
7878
throw $errorMessage
7979
}
80+
$previousProgressPreference = $ProgressPreference
81+
$ProgressPreference = 'SilentlyContinue'
8082
$googleFontsToInstall = @()
8183

8284
$guid = (New-Guid).Guid
@@ -125,5 +127,8 @@ Please run the command again with elevated rights (Run as Administrator) or prov
125127

126128
clean {
127129
Remove-Item -Path $tempPath -Force
130+
if ($previousProgressPreference) {
131+
$ProgressPreference = $previousProgressPreference
132+
}
128133
}
129134
}

0 commit comments

Comments
 (0)