1
0
Fork 0

Merge pull request #7857 from chr-hertel/feature/php-exec-path

Adding PHP_BINARY as env var to script execution
pull/7920/head
Jordi Boggiano 2019-01-19 18:47:33 +01:00 committed by GitHub
commit 8b90aadbe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -244,6 +244,12 @@ class EventDispatcher
if (substr($exec, 0, 5) === '@php ') {
$exec = $this->getPhpExecCommand() . ' ' . substr($exec, 5);
} else {
$finder = new PhpExecutableFinder();
$phpPath = $finder->find(false);
if ($phpPath) {
putenv('PHP_BINARY=' . $phpPath);
}
}
if (0 !== ($exitCode = $this->process->execute($exec))) {