File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
extension/BuildPhpExtension/private Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -35,25 +35,25 @@ Function Get-File {
35
35
for ($i = 0 ; $i -lt $Retries ; $i ++ ) {
36
36
try {
37
37
if ($OutFile -ne ' ' ) {
38
- Invoke-WebRequest - Uri $Url - OutFile $OutFile - TimeoutSec $TimeoutSec
38
+ Invoke-WebRequest - Uri $Url - OutFile $OutFile - TimeoutSec $TimeoutSec - UseBasicParsing
39
39
} else {
40
- Invoke-WebRequest - Uri $Url - TimeoutSec $TimeoutSec
40
+ Invoke-WebRequest - Uri $Url - TimeoutSec $TimeoutSec - UseBasicParsing
41
41
}
42
42
break ;
43
43
} catch {
44
44
if ($i -eq ($Retries - 1 )) {
45
45
if ($FallbackUrl ) {
46
46
try {
47
47
if ($OutFile -ne ' ' ) {
48
- Invoke-WebRequest - Uri $FallbackUrl - OutFile $OutFile - TimeoutSec $TimeoutSec
48
+ Invoke-WebRequest - Uri $FallbackUrl - OutFile $OutFile - TimeoutSec $TimeoutSec - UseBasicParsing
49
49
} else {
50
- Invoke-WebRequest - Uri $FallbackUrl - TimeoutSec $TimeoutSec
50
+ Invoke-WebRequest - Uri $FallbackUrl - TimeoutSec $TimeoutSec - UseBasicParsing
51
51
}
52
52
} catch {
53
- throw " Failed to download the file from $Url and $FallbackUrl "
53
+ throw " Failed to download the file from $Url and $FallbackUrl - $ ( $_ .Exception.Message ) "
54
54
}
55
55
} else {
56
- throw " Failed to download the file from $Url "
56
+ throw " Failed to download the file from $Url - $ ( $_ .Exception.Message ) "
57
57
}
58
58
}
59
59
}
Original file line number Diff line number Diff line change @@ -35,25 +35,25 @@ Function Get-File {
35
35
for ($i = 0 ; $i -lt $Retries ; $i ++ ) {
36
36
try {
37
37
if ($OutFile -ne ' ' ) {
38
- Invoke-WebRequest - Uri $Url - OutFile $OutFile - TimeoutSec $TimeoutSec
38
+ Invoke-WebRequest - Uri $Url - OutFile $OutFile - TimeoutSec $TimeoutSec - UseBasicParsing
39
39
} else {
40
- Invoke-WebRequest - Uri $Url - TimeoutSec $TimeoutSec
40
+ Invoke-WebRequest - Uri $Url - TimeoutSec $TimeoutSec - UseBasicParsing
41
41
}
42
42
break ;
43
43
} catch {
44
44
if ($i -eq ($Retries - 1 )) {
45
45
if ($FallbackUrl ) {
46
46
try {
47
47
if ($OutFile -ne ' ' ) {
48
- Invoke-WebRequest - Uri $FallbackUrl - OutFile $OutFile - TimeoutSec $TimeoutSec
48
+ Invoke-WebRequest - Uri $FallbackUrl - OutFile $OutFile - TimeoutSec $TimeoutSec - UseBasicParsing
49
49
} else {
50
- Invoke-WebRequest - Uri $FallbackUrl - TimeoutSec $TimeoutSec
50
+ Invoke-WebRequest - Uri $FallbackUrl - TimeoutSec $TimeoutSec - UseBasicParsing
51
51
}
52
52
} catch {
53
- throw " Failed to download the file from $Url and $FallbackUrl "
53
+ throw " Failed to download the file from $Url and $FallbackUrl - $ ( $_ .Exception.Message ) "
54
54
}
55
55
} else {
56
- throw " Failed to download the file from $Url "
56
+ throw " Failed to download the file from $Url - $ ( $_ .Exception.Message ) "
57
57
}
58
58
}
59
59
}
You can’t perform that action at this time.
0 commit comments