|
@@ 142-148 (lines=7) @@
|
| 139 |
|
|
| 140 |
|
// checking environment variable. |
| 141 |
|
$pathList = explode(PATH_SEPARATOR, self::getEnvPath()); |
| 142 |
|
foreach ($pathList as $path) { |
| 143 |
|
$command = $path . DIRECTORY_SEPARATOR . $cmd; |
| 144 |
|
$bin = self::isExecutable($command); |
| 145 |
|
if (null !== $bin) { |
| 146 |
|
return $bin; |
| 147 |
|
} |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
// some more paths we came across that where added manually |
| 151 |
|
foreach ($optionalLocations as $path) { |
|
@@ 151-157 (lines=7) @@
|
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
// some more paths we came across that where added manually |
| 151 |
|
foreach ($optionalLocations as $path) { |
| 152 |
|
$command = $path . DIRECTORY_SEPARATOR . $cmd; |
| 153 |
|
$bin = self::isExecutable($command); |
| 154 |
|
if (null !== $bin) { |
| 155 |
|
return $bin; |
| 156 |
|
} |
| 157 |
|
} |
| 158 |
|
throw new RuntimeException(sprintf('\'%s\' was nowhere to be found please specify the correct path', $cmd)); |
| 159 |
|
} |
| 160 |
|
|