Преглед изворни кода

Add support for relative paths in handling of install-path for the installed.json

Jordi Boggiano пре 5 година
родитељ
комит
6e45a53e76
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/Composer/Repository/FilesystemRepository.php

+ 1 - 1
src/Composer/Repository/FilesystemRepository.php

@@ -96,7 +96,7 @@ class FilesystemRepository extends WritableArrayRepository
         foreach ($this->getCanonicalPackages() as $package) {
             $pkgArray = $dumper->dump($package);
             $path = $installationManager->getInstallPath($package);
-            $pkgArray['install-path'] = ('' !== $path && null !== $path) ? $fs->findShortestPath($repoDir, $path, true) : null;
+            $pkgArray['install-path'] = ('' !== $path && null !== $path) ? $fs->findShortestPath($repoDir, $fs->isAbsolutePath($path) ? $path : getcwd() . '/' . $path, true) : null;
             $data['packages'][] = $pkgArray;
         }