File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ Function Get-ICUUrl() {
1010 [ValidateNotNull ()]
1111 $vs_version
1212 )
13- $trunk = " https://windows .php.net"
14- $urls = @ (" ${trunk} /downloads /php-sdk/deps/${vs_version} /${arch} " , " ${trunk} /downloads /php-sdk/deps/archives/${vs_version} /${arch} " )
13+ $trunk = " https://downloads .php.net"
14+ $urls = @ (" ${trunk} /~windows /php-sdk/deps/${vs_version} /${arch} / " , " ${trunk} /~windows /php-sdk/deps/archives/${vs_version} /${arch} / " )
1515 foreach ($url in $urls ) {
16- $web_content = Get-File - Url $url
16+ try {
17+ $web_content = Get-File - Url $url 2> $null
18+ } catch { continue }
1719 foreach ($link in $web_content.Links ) {
18- if ($link -match " / .*ICU-${icu_version} .*/ " ) {
19- return $trunk + $link.HREF
20+ if ($link.href -match " .*ICU-${icu_version} .*" ) {
21+ return $url + $link.HREF
2022 }
2123 }
2224 }
You can’t perform that action at this time.
0 commit comments