Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Commit 2729d09

Browse files
X-Guardianngetchell
authored andcommitted
Disable Invoke-WebRequest Progress Bar (#183)
1 parent df7184b commit 2729d09

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

PSGitLab/Private/QueryGitLabAPI.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Function QueryGitLabAPI {
4949
}
5050

5151
try {
52+
$ProgressPreference = 'SilentlyContinue'
5253
Write-Verbose "URL: $($Request.URI)"
5354
$webContent = Invoke-WebRequest @Request
5455
$totalPages = if ($webContent.Headers.ContainsKey('X-Total-Pages')) {
@@ -74,6 +75,7 @@ Function QueryGitLabAPI {
7475
Write-Error -Message "$($GitlabErrorText.message.base)"
7576
}
7677
finally {
78+
$ProgressPreference = 'Continue'
7779
Remove-Variable -Name newRequest -ErrorAction SilentlyContinue
7880
}
7981

0 commit comments

Comments
 (0)