1
0
Fork 0

Use trim filter on 'php' location

pull/831/head
Alexey Prilipko 2012-06-30 14:09:11 +11:00
parent ac3cebc633
commit 59773dd9f6
2 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -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),