File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ function Find-UnitySetupInstaller
201
201
$patchPage = " https://unity3d.com/unity/qa/patch-releases?version=$ ( $Version.Major ) .$ ( $Version.Minor ) "
202
202
$searchPages += $patchPage
203
203
204
- $webResult = Invoke-WebRequest $patchPage
204
+ $webResult = Invoke-WebRequest $patchPage - UseBasicParsing
205
205
$searchPages += $webResult.Links | Where-Object {
206
206
$_.href -match " \/unity\/qa\/patch-releases\?version=$ ( $Version.Major ) \.$ ( $Version.Minor ) &page=(\d+)" -and $Matches [1 ] -gt 1
207
207
} | ForEach-Object {
@@ -212,8 +212,8 @@ function Find-UnitySetupInstaller
212
212
213
213
foreach ($page in $searchPages )
214
214
{
215
- $webResult = Invoke-WebRequest $page
216
- $prototypeLink = $webResult.Links | Select-Object - ExpandProperty href | Where-Object {
215
+ $webResult = Invoke-WebRequest $page - UseBasicParsing
216
+ $prototypeLink = $webResult.Links | Select-Object - ExpandProperty href - ErrorAction SilentlyContinue | Where-Object {
217
217
$_ -match " $ ( $installerTemplates [[UnitySetupComponentType ]::Setup ]) $"
218
218
}
219
219
@@ -243,7 +243,7 @@ function Find-UnitySetupInstaller
243
243
foreach ( $baseUrl in $knownBaseUrls ) {
244
244
$endpoint = [uri ][System.IO.Path ]::Combine($baseUrl , $linkComponents [1 ], $template );
245
245
try {
246
- $testResult = Invoke-WebRequest $endpoint - Method HEAD
246
+ $testResult = Invoke-WebRequest $endpoint - Method HEAD - UseBasicParsing
247
247
$result = New-Object UnitySetupInstaller - Property @ {
248
248
' ComponentType' = $_ ;
249
249
' Version' = $Version ;
You can’t perform that action at this time.
0 commit comments