File tree Expand file tree Collapse file tree
extension/BuildPhpExtension/private Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,8 +35,13 @@ Function Add-PhpDependencies {
3535 throw " Failed to find $library "
3636 }
3737 $file = $matchesFound.Matches [0 ].Value.Trim()
38- Get-File - Url " $phpBaseUrl /$ ( $Config.vs_version ) /$ ( $Config.arch ) /$file " - OutFile $library
39- Expand-Archive $library " ../deps" - Force
38+ $archive = Join-Path ([System.IO.Path ]::GetTempPath()) ([System.Guid ]::NewGuid().ToString() + ' .zip' )
39+ try {
40+ Get-File - Url " $phpBaseUrl /$ ( $Config.vs_version ) /$ ( $Config.arch ) /$file " - OutFile $archive
41+ Expand-Archive - LiteralPath $archive - DestinationPath " ../deps" - Force
42+ } finally {
43+ Remove-Item - LiteralPath $archive - Force - ErrorAction SilentlyContinue
44+ }
4045 Add-BuildLog tick " $library " " Added $ ( $file -replace ' \.zip$' ) "
4146 } catch {
4247 Add-BuildLog cross " $library " " Failed to download $library "
You can’t perform that action at this time.
0 commit comments