Merge remote branch 'pborreli/windows-fix-process'
* pborreli/windows-fix-process: [Process] Better guess of php bin executable path [Process] Removed useless getenv
This commit is contained in:
commit
33456e63dc
@ -78,8 +78,8 @@ class PhpProcess extends Process
|
|||||||
*/
|
*/
|
||||||
private function getPhpBinary()
|
private function getPhpBinary()
|
||||||
{
|
{
|
||||||
if (getenv('PHP_PATH')) {
|
if ($php = getenv('PHP_PATH')) {
|
||||||
if (!is_executable($php = getenv('PHP_PATH'))) {
|
if (!is_executable($php)) {
|
||||||
throw new \RuntimeException('The defined PHP_PATH environment variable is not a valid PHP executable.');
|
throw new \RuntimeException('The defined PHP_PATH environment variable is not a valid PHP executable.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,6 +93,12 @@ class PhpProcess extends Process
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($php = getenv('PHP_PEAR_PHP_BIN')) {
|
||||||
|
if (is_executable($php)) {
|
||||||
|
return $php;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw new \RuntimeException('Unable to find the PHP executable.');
|
throw new \RuntimeException('Unable to find the PHP executable.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user