From 021e9ea23af81571749a1b5b5a5159001e14a2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 4 Nov 2021 18:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-engine/Application.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kiri-engine/Application.php b/kiri-engine/Application.php index 0938dece..c1b4c7e2 100644 --- a/kiri-engine/Application.php +++ b/kiri-engine/Application.php @@ -22,7 +22,6 @@ use Kiri\Events\OnBeforeCommandExecute; use Kiri\Exception\NotFindClassException; use Kiri\FileListen\FileChangeCustomProcess; use ReflectionException; -use Server\ServerCommand; use Server\ServerProviders; use stdClass; use Swoole\Process; @@ -30,6 +29,7 @@ use Swoole\Timer; use Symfony\Component\Console\Application as ConsoleApplication; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\ConsoleOutput; /** @@ -192,12 +192,14 @@ class Application extends BaseApplication */ public function execute(array $argv): void { + /** @var InputInterface $input */ [$input, $output] = $this->argument($argv); try { $console = di(ConsoleApplication::class); $command = $input->getFirstArgument(); if (empty($command)) { - $command = 'list'; + $input->setArgument('action', 'restart'); + $command = 'sw:server'; } $command = $console->find($command); if ($command instanceof Command) {