diff --git a/PhpManager/private/Expand-ArchiveWith7Zip.ps1 b/PhpManager/private/Expand-ArchiveWith7Zip.ps1 index 560bf7c..3fc906c 100644 --- a/PhpManager/private/Expand-ArchiveWith7Zip.ps1 +++ b/PhpManager/private/Expand-ArchiveWith7Zip.ps1 @@ -55,6 +55,9 @@ } $sevenZipArguments += $ArchivePath $sevenZipPath = [System.IO.Path]::Combine($PSScriptRoot, 'bin', "7za-$sevenZipArchitecture.exe") + If (-Not(Test-Path -LiteralPath $sevenZipPath -PathType Leaf)) { + throw "7-Zip executable not found at $sevenZipPath" + } $sevenZipResult = & $sevenZipPath $sevenZipArguments if ($LASTEXITCODE -ne 0) { if ($createdHere) {