From 5d51f5b99173cca2a731674e8023063d433151eb Mon Sep 17 00:00:00 2001 From: Maarten Date: Mon, 5 Oct 2020 21:55:27 +0200 Subject: [PATCH] Speed up Github downloads by suppressing Invoke-RestMethod progress --- PSDepend/PSDependScripts/GitHub.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PSDepend/PSDependScripts/GitHub.ps1 b/PSDepend/PSDependScripts/GitHub.ps1 index 014cf32..1cea5b6 100644 --- a/PSDepend/PSDependScripts/GitHub.ps1 +++ b/PSDepend/PSDependScripts/GitHub.ps1 @@ -445,7 +445,10 @@ if(($PSDependAction -contains 'Install') -and $ShouldInstall) $OutPath = Join-Path ([System.IO.Path]::GetTempPath()) ([guid]::NewGuid().guid) New-Item -ItemType Directory -Path $OutPath -Force | Out-Null $OutFile = Join-Path $OutPath "$DependencyVersion.zip" + $PreviousProgressPreference=$ProgressPreference + $ProgressPreference='SilentlyContinue' Invoke-RestMethod -Uri $URL -OutFile $OutFile + $ProgressPreference=$PreviousProgressPreference if(-not (Test-Path $OutFile)) {