diff options
author | Robert Adam <dev@robert-adam.de> | 2020-01-30 20:49:26 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2020-04-04 17:54:27 +0300 |
commit | 8271da3a4160e541e819adae99b5f1de331c49f1 (patch) | |
tree | 2d69d0122bcfe35ae121804b8aef03ba4c25298c /scripts | |
parent | 551f061529b3bbb5dd51cdc64c13cfa9a5665d2a (diff) |
scripts/azure-pipelines/install-environment.ps1: Increase the performance of the Invoke-WebRequest by disabling the 'progressbar'
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/azure-pipelines/install-environment.ps1 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/azure-pipelines/install-environment.ps1 b/scripts/azure-pipelines/install-environment.ps1 index e405adc1e..052909b4f 100644 --- a/scripts/azure-pipelines/install-environment.ps1 +++ b/scripts/azure-pipelines/install-environment.ps1 @@ -38,7 +38,14 @@ if (-Not (Test-Path $env_7z)) { Write-Host "Environment not cached. Downloading..." $env_url = "$MUMBLE_ENVIRONMENT_SOURCE/$MUMBLE_ENVIRONMENT_VERSION.7z" try { + # According to https://github.com/PowerShell/PowerShell/issues/2138 disabling the + # progressbar can significantly increase the speed of Invoke-Web-Request. + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri $env_url -OutFile $env_7z + + # Reset progressbar + $ProgressPreference = 'Continue' } catch { Write-Host "Failed at downloading build-environment: $PSItem" exit 1 |