Make nicer errors for PHP binary not being found

This commit is contained in:
Dylan K. Taylor
2021-11-30 23:45:25 +00:00
parent 7665f4f443
commit d535f02096
2 changed files with 21 additions and 3 deletions

View File

@ -11,8 +11,13 @@ if($php -ne ""){
}elseif(Test-Path "bin\php\php.exe"){
$env:PHPRC = ""
$binary = "bin\php\php.exe"
}else{
}elseif((Get-Command php -ErrorAction SilentlyContinue)){
$binary = "php"
}else{
echo "Couldn't find a PHP binary in system PATH or $pwd\bin\php"
echo "Please refer to the installation instructions at https://doc.pmmp.io/en/rtfd/installation.html"
pause
exit 1
}
if($file -eq ""){