From 39fc5b4fff470976f7f98b95257eff14987f500c Mon Sep 17 00:00:00 2001 From: Dusko Dobranic <101048884+ddobranic@users.noreply.github.com> Date: Wed, 22 Mar 2023 08:45:17 +0100 Subject: [PATCH] [macOS] Use variable instead of hard coded value (#7214) --- images/macos/helpers/Common.Helpers.psm1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/images/macos/helpers/Common.Helpers.psm1 b/images/macos/helpers/Common.Helpers.psm1 index 8d1dd4241..d877e5acd 100644 --- a/images/macos/helpers/Common.Helpers.psm1 +++ b/images/macos/helpers/Common.Helpers.psm1 @@ -101,7 +101,8 @@ function Start-DownloadWithRetry { [string] $Url, [string] $Name, [string] $DownloadPath = "${env:Temp}", - [int] $Retries = 20 + [int] $Retries = 20, + [int] $Interval = 30 ) if ([String]::IsNullOrEmpty($Name)) { @@ -130,8 +131,8 @@ function Start-DownloadWithRetry { exit 1 } - Write-Host "Waiting 30 seconds before retrying. Retries left: $Retries" - Start-Sleep -Seconds 30 + Write-Host "Waiting $Interval seconds before retrying. Retries left: $Retries" + Start-Sleep -Seconds $Interval } }