Skip to content

Commit

Permalink
改进版本号获取指令
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Jul 12, 2023
1 parent 66eb9cf commit 2d833b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/think/console/command/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace think\console\command;

use Composer\InstalledVersions;
use think\console\Command;
use think\console\Input;
use think\console\Output;
Expand All @@ -27,7 +28,8 @@ protected function configure()

protected function execute(Input $input, Output $output)
{
$output->writeln('v' . $this->app->version());
$version = InstalledVersions::getPrettyVersion('topthink/framework');
$output->writeln($version);
}

}

0 comments on commit 2d833b2

Please sign in to comment.