Skip to content

Commit f1d65a3

Browse files
committed
Pring more
1 parent 8d918b0 commit f1d65a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

run.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,20 +169,24 @@ function Join-Paths([string]$path, [string[]]$childPaths) {
169169
}
170170

171171
function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) {
172+
Write-Host -ForegroundColor Magenta "Remote Path $RemotePath"
173+
Write-Host -ForegroundColor Magenta "Local Path $LocalPath"
172174
if ($RemotePath -notlike 'http*') {
173175
Copy-Item $RemotePath $LocalPath
174176
return
175177
}
178+
Write-Host -ForegroundColor Magenta "About to start downloading"
176179

177180
$retries = 10
178181
while ($retries -gt 0) {
179182
$retries -= 1
180183
try {
181184
$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
182-
Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath
185+
$Response = Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath
183186
return
184187
}
185188
catch {
189+
Write-Host -ForegroundColor Magenta "$Response"
186190
Write-Verbose "Request failed. $retries retries remaining"
187191
}
188192
}

0 commit comments

Comments
 (0)