Use trim filter on 'php' location

main
Alexey Prilipko 12 years ago
parent ac3cebc633
commit 59773dd9f6

@ -163,9 +163,10 @@ class PearPackageExtractor
private function applyRelease(&$actions, $releaseNodes, $vars)
{
foreach ($releaseNodes as $releaseNode) {
$requiredOs = (string) ($releaseNode->installconditions && $releaseNode->installconditions->os && $releaseNode->installconditions->os->name) ?: '';
if ($requiredOs && $vars['os'] != $requiredOs)
$requiredOs = $releaseNode->installconditions && $releaseNode->installconditions->os && $releaseNode->installconditions->os->name ? (string) $releaseNode->installconditions->os->name : '';
if ($requiredOs && $vars['os'] != $requiredOs) {
continue;
}
if ($releaseNode->filelist) {
foreach ($releaseNode->filelist->children() as $action) {

@ -62,7 +62,7 @@ class PearInstaller extends LibraryInstaller
$vars = array(
'os' => $isWindows ? 'windows' : 'linux',
'php_bin' => ($isWindows ? getenv('PHPRC') .'php.exe' : `which php`),
'php_bin' => ($isWindows ? getenv('PHPRC') .'php.exe' : trim(`which php`)),
'pear_php' => $this->getInstallPath($package),
'bin_dir' => $this->getInstallPath($package) . '/bin',
'php_dir' => $this->getInstallPath($package),

Loading…
Cancel
Save