28 return array_unique( array_merge(
29 [
'/usr/bin',
'/bin',
'/usr/local/bin',
'/opt/csw/bin',
30 '/usr/gnu/bin',
'/usr/sfw/bin',
'/sw/bin',
'/opt/local/bin' ],
31 explode( PATH_SEPARATOR, getenv(
'PATH' ) )
53 $command =
$path . DIRECTORY_SEPARATOR . $name;
56 $file_exists = @is_executable( $command );
59 if ( !$versionInfo ) {
63 $output = Shell::command( $command, $versionInfo[0] )
64 ->includeStderr()->execute()->getStdout();
65 if ( str_contains( $output, $versionInfo[1] ) ) {
92 foreach ( (array)$names as $name ) {
93 foreach ( $paths as
$path ) {
95 if ( $exe !==
false ) {
107class_alias( ExecutableFinder::class,
'ExecutableFinder' );