Skip to content

Commit

Permalink
Expand-Archive won't set $LastExitCode
Browse files Browse the repository at this point in the history
  • Loading branch information
chalcolith committed Dec 5, 2024
1 parent ddec41d commit fc0354f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ function BuildLibs
$pcre2ZipTgt = Join-Path -Path $libsDir -ChildPath $pcre2Zip
if (-not (Test-Path $pcre2ZipTgt)) { Invoke-WebRequest -TimeoutSec 300 -Uri "https://github.com/PhilipHazel/pcre2/releases/download/$pcre2/$pcre2Zip" -OutFile $pcre2ZipTgt }
Write-Output "Expand-Archive -Force -LiteralPath `"$pcre2ZipTgt`" -DestinationPath `"$libsDir`""
$output = Expand-Archive -Force -LiteralPath "$pcre2ZipTgt" -DestinationPath "$libsDir"
Write-Output $output
if ($LastExitCode -ne 0) { throw "Error downloading and unzipping $pcre2Zip" }
Expand-Archive -Force -LiteralPath "$pcre2ZipTgt" -DestinationPath "$libsDir"
}

# Write-Output "Building $pcre2"
Expand Down

0 comments on commit fc0354f

Please sign in to comment.