Skip to content

Commit

Permalink
Fix unpacking when private packagist is used
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 15, 2019
1 parent 4b5d25a commit 4c8153f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Unpacker.php
Expand Up @@ -35,7 +35,8 @@ public function unpack(Operation $op): Result
$json = new JsonFile(Factory::getComposerFile());
$manipulator = new JsonManipulator(file_get_contents($json->getPath()));
foreach ($op->getPackages() as $package) {
$pkg = $this->composer->getRepositoryManager()->findPackage($package['name'], $package['version'] ?: '*');
$pkg = $this->composer->getRepositoryManager()->getLocalRepository()->findPackage($package['name'], $package['version'] ?: '*');
$pkg = $pkg ?? $this->composer->getRepositoryManager()->findPackage($package['name'], $package['version'] ?: '*');

// not unpackable or no --unpack flag or empty packs (markers)
if (
Expand Down

0 comments on commit 4c8153f

Please sign in to comment.