1
0
Fork 0

Merge pull request #2496 from oziks/fix-exclude

Fix error on check exclude from download composer.json
pull/2528/merge
Jordi Boggiano 2013-12-26 01:23:24 -08:00
commit bcb5e38bcb
1 changed files with 6 additions and 4 deletions

View File

@ -144,12 +144,14 @@ class ArchiveManager
$this->downloadManager->download($package, $sourcePath);
// Check exclude from downloaded composer.json
$jsonFile = new JsonFile($sourcePath.'/composer.json');
if (file_exists($composerJsonPath = $sourcePath.'/composer.json')) {
$jsonFile = new JsonFile($composerJsonPath);
$jsonData = $jsonFile->read();
if (!empty($jsonData['archive']['exclude'])) {
$package->setArchiveExcludes($jsonData['archive']['exclude']);
}
}
}
// Create the archive
$archivePath = $usableArchiver->archive($sourcePath, $target, $format, $package->getArchiveExcludes());