diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 9dcb88d03..84bda9d90 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -336,12 +336,6 @@ EOT $matches = $this->findPackages($package); if (count($matches)) { - $output->writeln(array( - '', - sprintf('Found %s packages matching %s', count($matches), $package), - '' - )); - $exactMatch = null; $choices = array(); foreach ($matches as $position => $foundPackage) { @@ -354,6 +348,12 @@ EOT // no match, prompt which to pick if (!$exactMatch) { + $output->writeln(array( + '', + sprintf('Found %s packages matching %s', count($matches), $package), + '' + )); + $output->writeln($choices); $output->writeln('');