1
0
Fork 0

Also use channel string for update message

https://github.com/composer/composer/pull/9305#issuecomment-714381153
pull/9305/head
terry.kern 2020-10-22 14:41:16 +02:00
parent e68b52697b
commit 0466add822
1 changed files with 6 additions and 5 deletions

View File

@ -176,11 +176,12 @@ EOT
return 1;
}
$channelString = $versionsUtil->getChannel();
if (is_numeric($channelString)) {
$channelString .= '.x';
}
if (Composer::VERSION === $updateVersion) {
$channelString = $versionsUtil->getChannel();
if (is_numeric($channelString)) {
$channelString .= '.x';
}
$io->writeError(
sprintf(
'<info>You are already using composer version %s (%s channel).</info>',
@ -208,7 +209,7 @@ EOT
$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');
$signature = $remoteFilesystem->getContents(self::HOMEPAGE, $remoteFilename.'.sig', false);
$io->writeError(' ', false);