File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,22 @@ function Add-TestRequirements {
6060 Write-Host " Downloading PHP build $binZipFile ..."
6161 Get-PhpBuild - PhpVersion $PhpVersion - Arch $Arch - Ts $Ts - VsVersion $VsVersion
6262 } else {
63- [System.IO.Compression.ZipFile ]::ExtractToDirectory($binZipFilePath , $binDirectoryPath )
63+ try {
64+ [System.IO.Compression.ZipFile ]::ExtractToDirectory($binZipFilePath , $binDirectoryPath )
65+ } catch {
66+ 7z x $binZipFilePath " -o$binDirectoryPath " - y | Out-Null
67+ }
6468 }
6569
6670 if (-not (Test-Path $testZipFilePath )) {
6771 Write-Host " Downloading PHP test pack $testZipFile ..."
6872 Get-PhpTestPack - PhpVersion $PhpVersion - TestsDirectory $TestsDirectory
6973 } else {
70- [System.IO.Compression.ZipFile ]::ExtractToDirectory($testZipFilePath , $testsDirectoryPath )
74+ try {
75+ [System.IO.Compression.ZipFile ]::ExtractToDirectory($testZipFilePath , $testsDirectoryPath )
76+ } catch {
77+ 7z x $testZipFilePath " -o$testsDirectoryPath " - y | Out-Null
78+ }
7179 }
7280
7381 $FetchDeps = $False
Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ function Get-PhpBuild {
6868 $binZipFilePath = Join-Path $currentDirectory $binZipFile
6969 $binDirectoryPath = Join-Path $currentDirectory phpbin
7070
71- [System.IO.Compression.ZipFile ]::ExtractToDirectory($binZipFilePath , $binDirectoryPath )
71+ try {
72+ [System.IO.Compression.ZipFile ]::ExtractToDirectory($binZipFilePath , $binDirectoryPath )
73+ } catch {
74+ 7z x $binZipFilePath " -o$binDirectoryPath " - y | Out-Null
75+ }
7276 }
7377 end {
7478 }
Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ function Get-PhpTestPack {
4949 $testZipFilePath = Join-Path $currentDirectory $testZipFile
5050 $testsDirectoryPath = Join-Path $currentDirectory $TestsDirectory
5151
52- [System.IO.Compression.ZipFile ]::ExtractToDirectory($testZipFilePath , $testsDirectoryPath )
52+ try {
53+ [System.IO.Compression.ZipFile ]::ExtractToDirectory($testZipFilePath , $testsDirectoryPath )
54+ } catch {
55+ 7z x $testZipFilePath " -o$testsDirectoryPath " - y | Out-Null
56+ }
5357 }
5458 end {
5559 }
You can’t perform that action at this time.
0 commit comments