diff --git a/src/Composer/Satis/Command/BuildCommand.php b/src/Composer/Satis/Command/BuildCommand.php index 0b1f1678..2694cc3c 100644 --- a/src/Composer/Satis/Command/BuildCommand.php +++ b/src/Composer/Satis/Command/BuildCommand.php @@ -251,6 +251,15 @@ private function selectPackages(Composer $composer, OutputInterface $output, $ve } } else { $links = array_values($composer->getPackage()->getRequires()); + + // only pick up packages in our filter, if a filter has been set. + if (count($packagesFilter) > 0) { + $links = array_filter($links, function(Link $link) use ($packagesFilter) { + return in_array($link->getTarget(), $packagesFilter); + }); + } + + $links = array_values($links); }