Restore realpath behavior
parent
fea16b39a1
commit
f54b04aac8
|
@ -78,11 +78,9 @@ class LibraryInstaller implements InstallerInterface
|
|||
*/
|
||||
public function install(PackageInterface $package)
|
||||
{
|
||||
$this->initializeDirs();
|
||||
$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
|
||||
if (!is_readable($downloadPath) && $this->repository->hasPackage($package)) {
|
||||
$this->removeBinaries($package);
|
||||
|
@ -104,11 +102,9 @@ class LibraryInstaller implements InstallerInterface
|
|||
throw new \InvalidArgumentException('Package is not installed: '.$initial);
|
||||
}
|
||||
|
||||
$this->initializeDirs();
|
||||
$downloadPath = $this->getInstallPath($initial);
|
||||
|
||||
$this->filesystem->ensureDirectoryExists($this->vendorDir);
|
||||
$this->filesystem->ensureDirectoryExists($this->binDir);
|
||||
|
||||
$this->removeBinaries($initial);
|
||||
$this->downloadManager->update($initial, $target, $downloadPath);
|
||||
$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)
|
||||
{
|
||||
$binPath = $this->filesystem->findShortestPath($link, $bin);
|
||||
|
|
Loading…
Reference in New Issue