mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Improve output formatting for update checks in CheckUpdateCommand
This commit is contained in:
parent
00c08e0c0c
commit
f7277cc012
@ -48,12 +48,10 @@ class CheckUpdateCommand extends BaseCommand
|
||||
foreach ($artifacts as $artifact) {
|
||||
$result = $downloader->checkUpdate($artifact, bare: $bare);
|
||||
if (!$result->needUpdate) {
|
||||
$this->output->writeln("Artifact <info>{$artifact}</info> is already up to date (version: {$result->new})");
|
||||
$this->output->writeln("Artifact <info>{$artifact}</info> is already up to date (<comment>{$result->new}</comment>)");
|
||||
} else {
|
||||
$this->output->writeln("<comment>Update available for artifact: {$artifact}</comment>");
|
||||
[$old, $new] = [$result->old ?? 'unavailable', $result->new ?? 'unknown'];
|
||||
$this->output->writeln(" Old version: <error>{$old}</error>");
|
||||
$this->output->writeln(" New version: <info>{$new}</info>");
|
||||
$this->output->writeln("Update available for <info>{$artifact}</info>: <comment>{$old}</comment> -> <comment>{$new}</comment>");
|
||||
}
|
||||
}
|
||||
return static::OK;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user