From f0842213e07dfc51b2a3795112fd566fd44ca9a3 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 11 Oct 2013 14:34:52 +0200 Subject: [PATCH] make sure relative paths from custom installers to not break the installation of binaries --- src/Composer/Installer/LibraryInstaller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index c883120f4..f409b4095 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -198,6 +198,12 @@ class LibraryInstaller implements InstallerInterface continue; } + // in case a custom installer returned a relative path for the + // $package, we can now safely turn it into a absolute path (as we + // already checked the binary's existence). The following helpers + // will require absolute paths to work properly. + $binPath = realpath($binPath); + $this->initializeBinDir(); $link = $this->binDir.'/'.basename($bin); if (file_exists($link)) {