Commit: 1a4f497896692748efc5a9cf37f61094be9848c9 Author: Anatol Belski <[email protected]> Tue, 5 Sep 2017 18:26:37 +0200 Parents: 2b4b5f06559216bf905fe603b9e4c92a2bc8bef0 Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=1a4f497896692748efc5a9cf37f61094be9848c9 Log: Fix tools lookup Changed paths: M include/PeclExt.php Diff: diff --git a/include/PeclExt.php b/include/PeclExt.php index b5df59b..1fed1e3 100644 --- a/include/PeclExt.php +++ b/include/PeclExt.php @@ -1206,13 +1206,18 @@ nodoc: protected function getToolFilepath($tool, $hard_error = true) { - $path = `where $tool`; - $path = trim($path); + $path = NULL; - if (!$path && $hard_error) { + exec("where $tool", $out, $st); + + if (($st || count($out) < 1) && $hard_error) { throw new \Exception("'$tool' not found."); } + if (isset($out[0])) { + $path = trim($out[0]); + } + return $path; } } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
