File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -147,15 +147,19 @@ Function Get-File {
147
147
}
148
148
break ;
149
149
} catch {
150
- if ($i -eq ($Retries - 1 ) -and ($null -ne $FallbackUrl )) {
151
- try {
152
- if ($null -ne $OutFile ) {
153
- Invoke-WebRequest - Uri $FallbackUrl - OutFile $OutFile - TimeoutSec $TimeoutSec
154
- } else {
155
- Invoke-WebRequest - Uri $FallbackUrl - TimeoutSec $TimeoutSec
150
+ if ($i -eq ($Retries - 1 )) {
151
+ if ($FallbackUrl ) {
152
+ try {
153
+ if ($null -ne $OutFile ) {
154
+ Invoke-WebRequest - Uri $FallbackUrl - OutFile $OutFile - TimeoutSec $TimeoutSec
155
+ } else {
156
+ Invoke-WebRequest - Uri $FallbackUrl - TimeoutSec $TimeoutSec
157
+ }
158
+ } catch {
159
+ throw " Failed to download the assets from $Url and $FallbackUrl "
156
160
}
157
- } catch {
158
- throw " Failed to download the assets from $Url and $FallbackUrl "
161
+ } else {
162
+ throw " Failed to download the assets from $Url "
159
163
}
160
164
}
161
165
}
You can’t perform that action at this time.
0 commit comments