소스 검색

Make sure vendor dir exists before dumping autoloader

Jordi Boggiano 13 년 전
부모
커밋
8f24a04a1d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/Composer/Autoload/AutoloadGenerator.php

+ 2 - 0
src/Composer/Autoload/AutoloadGenerator.php

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