1
0
Fork 0

Merge pull request #9305 from TerryKern/patch-1

Improve readability of version info message
pull/9323/head
Jordi Boggiano 2020-10-22 15:32:30 +02:00 committed by GitHub
commit 94e7ed4f05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions

View File

@ -176,8 +176,19 @@ EOT
return 1; return 1;
} }
$channelString = $versionsUtil->getChannel();
if (is_numeric($channelString)) {
$channelString .= '.x';
}
if (Composer::VERSION === $updateVersion) { if (Composer::VERSION === $updateVersion) {
$io->writeError(sprintf('<info>You are already using composer version %s (%s channel).</info>', $updateVersion, $versionsUtil->getChannel())); $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 // remove all backups except for the most recent, if any
if ($input->getOption('clean-backups')) { if ($input->getOption('clean-backups')) {
@ -198,7 +209,7 @@ EOT
$updatingToTag = !preg_match('{^[0-9a-f]{40}$}', $updateVersion); $updatingToTag = !preg_match('{^[0-9a-f]{40}$}', $updateVersion);
$io->write(sprintf("Updating to version <info>%s</info> (%s channel).", $updateVersion, $versionsUtil->getChannel())); $io->write(sprintf("Updating to version <info>%s</info> (%s channel).", $updateVersion, $channelString));
$remoteFilename = $baseUrl . ($updatingToTag ? "/download/{$updateVersion}/composer.phar" : '/composer.phar'); $remoteFilename = $baseUrl . ($updatingToTag ? "/download/{$updateVersion}/composer.phar" : '/composer.phar');
$signature = $remoteFilesystem->getContents(self::HOMEPAGE, $remoteFilename.'.sig', false); $signature = $remoteFilesystem->getContents(self::HOMEPAGE, $remoteFilename.'.sig', false);
$io->writeError(' ', false); $io->writeError(' ', false);