Restore realpath behavior
parent
fea16b39a1
commit
f54b04aac8
|
@ -78,11 +78,9 @@ class LibraryInstaller implements InstallerInterface
|
||||||
*/
|
*/
|
||||||
public function install(PackageInterface $package)
|
public function install(PackageInterface $package)
|
||||||
{
|
{
|
||||||
|
$this->initializeDirs();
|
||||||
$downloadPath = $this->getInstallPath($package);
|
$downloadPath = $this->getInstallPath($package);
|
||||||
|
|
||||||
$this->filesystem->ensureDirectoryExists($this->vendorDir);
|
|
||||||
$this->filesystem->ensureDirectoryExists($this->binDir);
|
|
||||||
|
|
||||||
// remove the binaries if it appears the package files are missing
|
// remove the binaries if it appears the package files are missing
|
||||||
if (!is_readable($downloadPath) && $this->repository->hasPackage($package)) {
|
if (!is_readable($downloadPath) && $this->repository->hasPackage($package)) {
|
||||||
$this->removeBinaries($package);
|
$this->removeBinaries($package);
|
||||||
|
@ -104,11 +102,9 @@ class LibraryInstaller implements InstallerInterface
|
||||||
throw new \InvalidArgumentException('Package is not installed: '.$initial);
|
throw new \InvalidArgumentException('Package is not installed: '.$initial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->initializeDirs();
|
||||||
$downloadPath = $this->getInstallPath($initial);
|
$downloadPath = $this->getInstallPath($initial);
|
||||||
|
|
||||||
$this->filesystem->ensureDirectoryExists($this->vendorDir);
|
|
||||||
$this->filesystem->ensureDirectoryExists($this->binDir);
|
|
||||||
|
|
||||||
$this->removeBinaries($initial);
|
$this->removeBinaries($initial);
|
||||||
$this->downloadManager->update($initial, $target, $downloadPath);
|
$this->downloadManager->update($initial, $target, $downloadPath);
|
||||||
$this->installBinaries($target);
|
$this->installBinaries($target);
|
||||||
|
@ -191,6 +187,14 @@ class LibraryInstaller implements InstallerInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function initializeDirs()
|
||||||
|
{
|
||||||
|
$this->filesystem->ensureDirectoryExists($this->vendorDir);
|
||||||
|
$this->filesystem->ensureDirectoryExists($this->binDir);
|
||||||
|
$this->vendorDir = realpath($this->vendorDir);
|
||||||
|
$this->binDir = realpath($this->binDir);
|
||||||
|
}
|
||||||
|
|
||||||
private function generateWindowsProxyCode($bin, $link)
|
private function generateWindowsProxyCode($bin, $link)
|
||||||
{
|
{
|
||||||
$binPath = $this->filesystem->findShortestPath($link, $bin);
|
$binPath = $this->filesystem->findShortestPath($link, $bin);
|
||||||
|
|
Loading…
Reference in New Issue