1
0
Fork 0

Stylistic fixes to the previous merge

pull/234/merge
Jordi Boggiano 2012-02-05 21:08:43 +01:00
parent d52feb1a9f
commit d35a1a4a9d
1 changed files with 5 additions and 5 deletions

View File

@ -80,16 +80,16 @@ class LibraryInstaller implements InstallerInterface
*/ */
public function install(PackageInterface $package) public function install(PackageInterface $package)
{ {
//remove the binaries first if its missing on filesystem $downloadPath = $this->getInstallPath($package);
if (!is_readable($this->getInstallPath($package)) && $this->repository->hasPackage($package)) {
// remove the binaries if it appears the package files are missing
if (!is_readable($downloadPath) && $this->repository->hasPackage($package)) {
$this->removeBinaries($package); $this->removeBinaries($package);
} }
$downloadPath = $this->getInstallPath($package);
$this->downloadManager->download($package, $downloadPath); $this->downloadManager->download($package, $downloadPath);
$this->installBinaries($package); $this->installBinaries($package);
if (!$this->repository->hasPackage($package)) {
if(!$this->repository->hasPackage($package)) {
$this->repository->addPackage(clone $package); $this->repository->addPackage(clone $package);
} }
} }