We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9204dc3 commit e1c0509Copy full SHA for e1c0509
src/PatternLab/Console.php
@@ -17,6 +17,7 @@
17
use \PatternLab\Console\Event as ConsoleEvent;
18
use \PatternLab\Dispatcher;
19
use \PatternLab\Timer;
20
+use \Symfony\Component\Process\PhpExecutableFinder;
21
22
class Console {
23
@@ -170,7 +171,9 @@ public static function getCommand() {
170
171
*/
172
public static function getPathPHP() {
173
- $path = isset($_SERVER["_"]) ? $_SERVER["_"] : Config::getOption("phpBin");
174
+ $manualPHP = Config::getOption("phpBin");
175
+ $autoPHP = new PhpExecutableFinder();
176
+ $path = $manualPHP ? $manualPHP : $autoPHP->find();
177
178
if (!$path) {
179
$configPath = Console::getHumanReadablePath(Config::getOption("configPath"));
0 commit comments