1
0
Fork 0

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

pull/8729/head
Jordi Boggiano 2020-03-28 20:39:11 +01:00
parent 1b1d59ee6c
commit 6e45a53e76
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}