1
0
Fork 0

Fix error on check exclude from download composer.json

pull/2496/head
Morgan Brunot 2013-12-10 21:14:50 +01:00
parent 80499bb024
commit a300e1d45b
1 changed files with 6 additions and 4 deletions

View File

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