Skip to content

Commit

Permalink
using symfony class to find PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolsen committed Jul 22, 2016
1 parent 9204dc3 commit e1c0509
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PatternLab/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use \PatternLab\Console\Event as ConsoleEvent;
use \PatternLab\Dispatcher;
use \PatternLab\Timer;
use \Symfony\Component\Process\PhpExecutableFinder;

class Console {

Expand Down Expand Up @@ -170,7 +171,9 @@ public static function getCommand() {
*/
public static function getPathPHP() {

$path = isset($_SERVER["_"]) ? $_SERVER["_"] : Config::getOption("phpBin");
$manualPHP = Config::getOption("phpBin");
$autoPHP = new PhpExecutableFinder();
$path = $manualPHP ? $manualPHP : $autoPHP->find();

if (!$path) {
$configPath = Console::getHumanReadablePath(Config::getOption("configPath"));
Expand Down

0 comments on commit e1c0509

Please sign in to comment.