1
0
Fork 0

Exclude dirs from list of binaries

pull/886/head
Alexey Prilipko 2012-07-08 15:20:35 +11:00
parent bc2d30492a
commit 22d41845ae
2 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,6 @@ use Composer\DependencyResolver\Operation\UpdateOperation;
use Composer\DependencyResolver\Operation\UninstallOperation;
use Composer\DependencyResolver\Operation\MarkAliasInstalledOperation;
use Composer\DependencyResolver\Operation\MarkAliasUninstalledOperation;
use Composer\Util\Filesystem;
/**
* Package operation manager.

View File

@ -15,10 +15,8 @@ namespace Composer\Installer;
use Composer\IO\IOInterface;
use Composer\Composer;
use Composer\Downloader\PearPackageExtractor;
use Composer\Downloader\DownloadManager;
use Composer\Repository\InstalledRepositoryInterface;
use Composer\Package\PackageInterface;
use Composer\Util\Filesystem;
/**
* Package installation manager.
@ -52,9 +50,10 @@ class PearInstaller extends LibraryInstaller
protected function installCode(PackageInterface $package)
{
parent::installCode($package);
parent::initializeBinDir();
$isWindows = defined('PHP_WINDOWS_VERSION_BUILD') ? true : false;
$php_bin = realpath($this->binDir . ($isWindows ? '/composer-php.bat' : '/composer-php'));
$php_bin = $this->binDir . ($isWindows ? '/composer-php.bat' : '/composer-php');
$installPath = $this->getInstallPath($package);
$vars = array(
@ -82,10 +81,12 @@ class PearInstaller extends LibraryInstaller
$binariesPath = $this->getInstallPath($package) . '/bin/';
$binaries = array();
if (file_exists($binariesPath)) {
foreach (new \FilesystemIterator($binariesPath, \FilesystemIterator::KEY_AS_FILENAME) as $fileName => $value) {
foreach (new \FilesystemIterator($binariesPath, \FilesystemIterator::KEY_AS_FILENAME | \FilesystemIterator::CURRENT_AS_FILEINFO) as $fileName => $value) {
if (!$value->isDir()) {
$binaries[] = 'bin/'.$fileName;
}
}
}
return $binaries;
}