소스 검색

Merge pull request #2317 from xrstf/installer-binaries

attempted fix for #1589 (installers & binaries)
Jordi Boggiano 11 년 전
부모
커밋
4989940533
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/Composer/Installer/LibraryInstaller.php

+ 6 - 0
src/Composer/Installer/LibraryInstaller.php

@@ -197,6 +197,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)) {