File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -182,10 +182,15 @@ function Find-UnitySetupInstaller
182
182
' f' { $searchPages += " https://unity3d.com/get-unity/download/archive" }
183
183
' b' { $searchPages += " https://unity3d.com/unity/beta/unity$Version " }
184
184
' p' {
185
- $webResult = Invoke-WebRequest " https://unity3d.com/unity/qa/patch-releases?version=$ ( $Version.Major ) .$ ( $Version.Minor ) "
186
- $searchPages += $webResult.Links | Where-Object { $_.href -match " \/unity\/qa\/patch-releases\?version=$ ( $Version.Major ) \.$ ( $Version.Minor ) &page=(\d+)" } | ForEach-Object {
187
- " https://unity3d.com/unity/qa/patch-releases?version=$ ( $Version.Major ) .$ ( $Version.Minor ) &page=$ ( $Matches [1 ]) "
188
- }
185
+ $patchPage = " https://unity3d.com/unity/qa/patch-releases?version=$ ( $Version.Major ) .$ ( $Version.Minor ) "
186
+ $searchPages += $patchPage
187
+
188
+ $webResult = Invoke-WebRequest $patchPage
189
+ $searchPages += $webResult.Links | Where-Object {
190
+ $_.href -match " \/unity\/qa\/patch-releases\?version=$ ( $Version.Major ) \.$ ( $Version.Minor ) &page=(\d+)" -and $Matches [1 ] -gt 1
191
+ } | ForEach-Object {
192
+ " https://unity3d.com/unity/qa/patch-releases?version=$ ( $Version.Major ) .$ ( $Version.Minor ) &page=$ ( $Matches [1 ]) "
193
+ }
189
194
}
190
195
}
191
196
@@ -196,7 +201,7 @@ function Find-UnitySetupInstaller
196
201
$_ -match " $ ( $installerTemplates [[UnitySetupComponentType ]::Setup ]) $"
197
202
}
198
203
199
- if ($null -eq $prototypeLink ) { break }
204
+ if ($null -ne $prototypeLink ) { break }
200
205
}
201
206
202
207
if ($null -eq $prototypeLink )
You can’t perform that action at this time.
0 commit comments