Pārlūkot izejas kodu

Skip the vendor dir when archiving the current project

Nils Adermann 12 gadi atpakaļ
vecāks
revīzija
735b59c1d6
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      src/Composer/Command/ArchiveCommand.php

+ 5 - 0
src/Composer/Command/ArchiveCommand.php

@@ -78,6 +78,11 @@ EOT
             }
         } else {
             $package = $this->getComposer()->getPackage();
+
+            // also ignore the vendor dir
+            $excludes = $package->getArchiveExcludes();
+            $excludes[] = '/'.$this->getComposer()->getConfig()->get('vendor-dir');
+            $package->setArchiveExcludes($excludes);
         }
 
         $io->write('<info>Creating the archive.</info>');