Browse Source

Output packages in archive command using getPrettyString

Nils Adermann 12 years ago
parent
commit
14ee67bed4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/Composer/Command/ArchiveCommand.php

+ 3 - 3
src/Composer/Command/ArchiveCommand.php

@@ -112,12 +112,12 @@ EOT
 
 
         if (count($packages) > 1) {
         if (count($packages) > 1) {
             $package = $packages[0];
             $package = $packages[0];
-            $io->write('<info>Found multiple matches, selected '.$package.'.</info>');
-            $io->write('Alternatives were '.implode(', ', $packages).'.');
+            $io->write('<info>Found multiple matches, selected '.$package->getPrettyString().'.</info>');
+            $io->write('Alternatives were '.implode(', ', array_map(function ($p) { return $p->getPrettyString(); }, $packages)).'.');
             $io->write('<comment>Please use a more specific constraint to pick a different package.</comment>');
             $io->write('<comment>Please use a more specific constraint to pick a different package.</comment>');
         } elseif ($packages) {
         } elseif ($packages) {
             $package = $packages[0];
             $package = $packages[0];
-            $io->write('<info>Found an exact match '.$package.'.</info>');
+            $io->write('<info>Found an exact match '.$package->getPrettyString().'.</info>');
         } else {
         } else {
             $io->write('<error>Could not find a package matching '.$packageName.'.</error>');
             $io->write('<error>Could not find a package matching '.$packageName.'.</error>');
             return false;
             return false;