diff --git a/PhpManager/private/Expand-ArchiveWith7Zip.ps1 b/PhpManager/private/Expand-ArchiveWith7Zip.ps1 index 3fc906c..722811b 100644 --- a/PhpManager/private/Expand-ArchiveWith7Zip.ps1 +++ b/PhpManager/private/Expand-ArchiveWith7Zip.ps1 @@ -59,6 +59,12 @@ throw "7-Zip executable not found at $sevenZipPath" } $sevenZipResult = & $sevenZipPath $sevenZipArguments + if ($null -eq $LASTEXITCODE) { + if ($sevenZipResult) { + throw "Extraction with 7-zip didn't set LASTEXITCODE; its output is $sevenZipResult" + } + throw "Extraction with 7-zip didn't set LASTEXITCODE" + } if ($LASTEXITCODE -ne 0) { if ($createdHere) { try {