diff --git a/src/Composer/Command/BaseDependencyCommand.php b/src/Composer/Command/BaseDependencyCommand.php index 493e4adda00d..8aa9759e026d 100644 --- a/src/Composer/Command/BaseDependencyCommand.php +++ b/src/Composer/Command/BaseDependencyCommand.php @@ -127,7 +127,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output, boo $this->printTable($output, $results); } - if ($inverted) { + if ($inverted && $input->hasArgument(self::ARGUMENT_CONSTRAINT)) { $this->getIO()->writeError('Not finding what you were looking for? Try calling `composer update "'.$input->getArgument(self::ARGUMENT_PACKAGE).':'.$input->getArgument(self::ARGUMENT_CONSTRAINT).'" --dry-run` to get another view on the problem.'); }