浏览代码

Merge pull request #632 from igorw/no-suggest-installed

Do not suggest packages that were installed
Jordi Boggiano 13 年之前
父节点
当前提交
f5ea87e855
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/Composer/Installer.php

+ 3 - 1
src/Composer/Installer.php

@@ -154,7 +154,9 @@ class Installer
 
         // output suggestions
         foreach ($this->suggestedPackages as $suggestion) {
-            $this->io->write($suggestion['source'].' suggests installing '.$suggestion['target'].' ('.$suggestion['reason'].')');
+            if (!$installedRepo->findPackages($suggestion['target'])) {
+                $this->io->write($suggestion['source'].' suggests installing '.$suggestion['target'].' ('.$suggestion['reason'].')');
+            }
         }
 
         if (!$this->dryRun) {