1
0
Fork 0

Make sure vendor dir exists before dumping autoloader

pull/582/head
Jordi Boggiano 2012-04-15 17:48:30 +02:00
parent f520ce6a80
commit 8f24a04a1d
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,8 @@ class AutoloadGenerator
public function dump(RepositoryInterface $localRepo, PackageInterface $mainPackage, InstallationManager $installationManager, $targetDir)
{
$filesystem = new Filesystem();
$filesystem->ensureDirectoryExists($installationManager->getVendorPath());
$filesystem->ensureDirectoryExists($targetDir);
$vendorPath = strtr(realpath($installationManager->getVendorPath()), '\\', '/');
$relVendorPath = $filesystem->findShortestPath(getcwd(), $vendorPath, true);
$vendorDirCode = $filesystem->findShortestPathCode(realpath($targetDir), $vendorPath, true);