Skip to content

Commit 1f8252a

Browse files
committed
Fix selecting php-builder builds on Windows
1 parent 3e2462a commit 1f8252a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scripts/win32.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Function Set-PhpCache {
258258
if($_.name -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
259259
return $_.name
260260
}
261-
}
261+
} | Select-Object -Last 1
262262
if($null -eq $asset) {
263263
throw "Asset not found"
264264
}
@@ -268,7 +268,7 @@ Function Set-PhpCache {
268268
if($_ -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
269269
return $_.split('/')[-1]
270270
}
271-
}
271+
} | Select-Object -Last 1
272272
}
273273
Get-File -Url $php_builder/releases/download/php$version/$asset -OutFile $php_dir\$asset
274274
Set-PhpDownloadCache -Path $php_dir CurrentUser
@@ -283,7 +283,7 @@ Function Add-DebugSymbols {
283283
if($_.name -match "php-debug-pack-$version.[0-9]+$dev$env:PHPTS-Win32-.*-$arch.zip") {
284284
return $_.name
285285
}
286-
}
286+
} | Select-Object -Last 1
287287
Get-File -Url $php_builder/releases/download/php$version/$asset -OutFile $php_dir\$asset
288288
Expand-Archive -Path $php_dir\$asset -DestinationPath $php_dir -Force
289289
Get-ChildItem -Path $php_dir -Filter php_*.pdb | Move-Item -Destination $ext_dir

0 commit comments

Comments
 (0)