From d35a1a4a9d25bf6a9f6d12edb8526a802e77e014 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 5 Feb 2012 21:08:43 +0100 Subject: [PATCH] Stylistic fixes to the previous merge --- src/Composer/Installer/LibraryInstaller.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index f9c4828fb..b1bdfa60d 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -80,16 +80,16 @@ class LibraryInstaller implements InstallerInterface */ public function install(PackageInterface $package) { - //remove the binaries first if its missing on filesystem - if (!is_readable($this->getInstallPath($package)) && $this->repository->hasPackage($package)) { + $downloadPath = $this->getInstallPath($package); + + // remove the binaries if it appears the package files are missing + if (!is_readable($downloadPath) && $this->repository->hasPackage($package)) { $this->removeBinaries($package); } - $downloadPath = $this->getInstallPath($package); $this->downloadManager->download($package, $downloadPath); $this->installBinaries($package); - - if(!$this->repository->hasPackage($package)) { + if (!$this->repository->hasPackage($package)) { $this->repository->addPackage(clone $package); } }