mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix #81520 TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php
This commit is contained in:
parent
ebaed43473
commit
3fb1cf24c3
1 changed files with 5 additions and 2 deletions
|
@ -1057,11 +1057,14 @@ function get_binary(string $php, string $sapi, string $sapi_path): ?string
|
||||||
if (IS_WINDOWS && file_exists("$dir/$sapi.exe")) {
|
if (IS_WINDOWS && file_exists("$dir/$sapi.exe")) {
|
||||||
return realpath("$dir/$sapi.exe");
|
return realpath("$dir/$sapi.exe");
|
||||||
}
|
}
|
||||||
|
// Sources tree
|
||||||
if (file_exists("$dir/../../$sapi_path")) {
|
if (file_exists("$dir/../../$sapi_path")) {
|
||||||
return realpath("$dir/../../$sapi_path");
|
return realpath("$dir/../../$sapi_path");
|
||||||
}
|
}
|
||||||
if (file_exists("$dir/$sapi")) {
|
// Installation tre, preserve command prefix/suffix
|
||||||
return realpath("$dir/$sapi");
|
$inst = str_replace('php', $sapi, basename($php));
|
||||||
|
if (file_exists("$dir/$inst")) {
|
||||||
|
return realpath("$dir/$inst");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue