1
0
Fork 0

Improve readability of version info message

Instead of:

> You are already using composer version 1.10.15 (1 channel).

it shows:

> You are already using composer version 1.10.15 (1.x channel).
pull/9305/head
TerryKern 2020-10-20 11:48:51 +02:00 committed by terry.kern
parent 7fda8433b1
commit e68b52697b
1 changed files with 11 additions and 1 deletions

View File

@ -177,7 +177,17 @@ EOT
}
if (Composer::VERSION === $updateVersion) {
$io->writeError(sprintf('<info>You are already using composer version %s (%s channel).</info>', $updateVersion, $versionsUtil->getChannel()));
$channelString = $versionsUtil->getChannel();
if (is_numeric($channelString)) {
$channelString .= '.x';
}
$io->writeError(
sprintf(
'<info>You are already using composer version %s (%s channel).</info>',
$updateVersion,
$channelString
)
);
// remove all backups except for the most recent, if any
if ($input->getOption('clean-backups')) {