Return non-zero exit code with --strict and single package
parent
71c2ecbace
commit
02b57ff4a2
|
@ -43,6 +43,7 @@ use Composer\Semver\Semver;
|
|||
* @author Robert Schönthal <seroscho@googlemail.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @author Jérémy Romey <jeremyFreeAgent>
|
||||
* @author Mihai Plasoianu <mihai@plasoianu.de>
|
||||
*/
|
||||
class ShowCommand extends BaseCommand
|
||||
{
|
||||
|
@ -196,9 +197,13 @@ EOT
|
|||
$this->displayPackageTree($package, $installedRepo, $repos);
|
||||
} else {
|
||||
$latestPackage = null;
|
||||
$exitCode = 0;
|
||||
if ($input->getOption('latest')) {
|
||||
$latestPackage = $this->findLatestPackage($package, $composer, $phpVersion);
|
||||
}
|
||||
if ($input->getOption('outdated') && $input->getOption('strict') && $latestPackage && $latestPackage->getFullPrettyVersion() !== $package->getFullPrettyVersion() && !$latestPackage->isAbandoned()) {
|
||||
$exitCode = 1;
|
||||
}
|
||||
$this->printMeta($package, $versions, $installedRepo, $latestPackage ?: null);
|
||||
$this->printLinks($package, 'requires');
|
||||
$this->printLinks($package, 'devRequires', 'requires (dev)');
|
||||
|
@ -213,7 +218,7 @@ EOT
|
|||
$this->printLinks($package, 'replaces');
|
||||
}
|
||||
|
||||
return;
|
||||
return $exitCode;
|
||||
}
|
||||
|
||||
// show tree view if requested
|
||||
|
|
Loading…
Reference in New Issue