From 28a8b3e4c501a2c74b9b5e90ab94c2bde717b879 Mon Sep 17 00:00:00 2001 From: jsor Date: Mon, 28 Nov 2011 08:51:00 +0100 Subject: [PATCH] Fix link collection --- src/Composer/Command/InstallCommand.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Composer/Command/InstallCommand.php b/src/Composer/Command/InstallCommand.php index f11510e0e..a10d16901 100644 --- a/src/Composer/Command/InstallCommand.php +++ b/src/Composer/Command/InstallCommand.php @@ -185,17 +185,14 @@ EOT private function collectLinks(InputInterface $input, PackageInterface $package) { - $requiredOnly = (Boolean) $input->getOption('no-install-recommends'); - $includeSuggested = (Boolean) $input->getOption('install-suggests'); - $links = $package->getRequires(); - if (!$requiredOnly) { + if (!$input->getOption('no-install-recommends')) { $links = array_merge($links, $package->getRecommends()); + } - if ($includeSuggested) { - $links = array_merge($links, $package->getSuggests()); - } + if ($input->getOption('install-suggests')) { + $links = array_merge($links, $package->getSuggests()); } return $links;