1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

cleaner solution

This commit is contained in:
Rob Bast 2015-06-05 13:04:56 +02:00
parent 7a50225389
commit dfbee6a532

View file

@ -196,13 +196,12 @@ EOT
$width--;
}
$writePath = !$input->getOption('name-only') && $input->getOption('path');
if ($writePath && null === $composer) {
if ($input->getOption('path') && null === $composer) {
$this->getIO()->writeError('No composer.json found in the current directory, disabling "path" option');
$writePath = false;
$input->setOption('path', false);
}
$writePath = !$input->getOption('name-only') && $input->getOption('path');
$writeVersion = !$input->getOption('name-only') && !$input->getOption('path') && $showVersion && ($nameLength + $versionLength + 3 <= $width);
$writeDescription = !$input->getOption('name-only') && !$input->getOption('path') && ($nameLength + ($showVersion ? $versionLength : 0) + 24 <= $width);
foreach ($packages[$type] as $package) {