浏览代码

Add explanation about match args in the "no installed package" output, refs #4663

Jordi Boggiano 9 年之前
父节点
当前提交
e8bc9232e0
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/Composer/Command/DependsCommand.php

+ 5 - 1
src/Composer/Command/DependsCommand.php

@@ -130,7 +130,11 @@ EOT
             sort($messages);
             sort($messages);
             $io->write($messages);
             $io->write($messages);
         } else {
         } else {
-            $io->writeError('<info>There is no installed package depending on "'.$needle.'".</info>');
+            $matchText = '';
+            if ($input->getOption('match-constraint') !== '*') {
+                $matchText = ' in versions '.($matchInvert ? 'not ':'').'matching ' . $input->getOption('match-constraint');
+            }
+            $io->writeError('<info>There is no installed package depending on "'.$needle.'"'.$matchText.'.</info>');
         }
         }
     }
     }
 }
 }