Exclude dirs from list of binaries
parent
bc2d30492a
commit
22d41845ae
|
@ -23,7 +23,6 @@ use Composer\DependencyResolver\Operation\UpdateOperation;
|
||||||
use Composer\DependencyResolver\Operation\UninstallOperation;
|
use Composer\DependencyResolver\Operation\UninstallOperation;
|
||||||
use Composer\DependencyResolver\Operation\MarkAliasInstalledOperation;
|
use Composer\DependencyResolver\Operation\MarkAliasInstalledOperation;
|
||||||
use Composer\DependencyResolver\Operation\MarkAliasUninstalledOperation;
|
use Composer\DependencyResolver\Operation\MarkAliasUninstalledOperation;
|
||||||
use Composer\Util\Filesystem;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Package operation manager.
|
* Package operation manager.
|
||||||
|
|
|
@ -15,10 +15,8 @@ namespace Composer\Installer;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Composer;
|
use Composer\Composer;
|
||||||
use Composer\Downloader\PearPackageExtractor;
|
use Composer\Downloader\PearPackageExtractor;
|
||||||
use Composer\Downloader\DownloadManager;
|
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Util\Filesystem;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Package installation manager.
|
* Package installation manager.
|
||||||
|
@ -52,9 +50,10 @@ class PearInstaller extends LibraryInstaller
|
||||||
protected function installCode(PackageInterface $package)
|
protected function installCode(PackageInterface $package)
|
||||||
{
|
{
|
||||||
parent::installCode($package);
|
parent::installCode($package);
|
||||||
|
parent::initializeBinDir();
|
||||||
|
|
||||||
$isWindows = defined('PHP_WINDOWS_VERSION_BUILD') ? true : false;
|
$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);
|
$installPath = $this->getInstallPath($package);
|
||||||
$vars = array(
|
$vars = array(
|
||||||
|
@ -82,10 +81,12 @@ class PearInstaller extends LibraryInstaller
|
||||||
$binariesPath = $this->getInstallPath($package) . '/bin/';
|
$binariesPath = $this->getInstallPath($package) . '/bin/';
|
||||||
$binaries = array();
|
$binaries = array();
|
||||||
if (file_exists($binariesPath)) {
|
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;
|
$binaries[] = 'bin/'.$fileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $binaries;
|
return $binaries;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue