From df7c8915fa84e65d949daab87e13fc61e705d820 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 7 Oct 2014 15:45:25 +0100 Subject: [PATCH] Skip notification about matches found in case we have an exact match, refs #3261 --- src/Composer/Command/InitCommand.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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('');