diff --git a/System/Application.php b/System/Application.php index e970b6c2..c9d544fd 100644 --- a/System/Application.php +++ b/System/Application.php @@ -136,23 +136,21 @@ class Application extends BaseApplication */ public function start(Input $argv): void { - run(function () use ($argv) { - try { - /** @var Console $manager */ - $manager = Snowflake::app()->get('console'); - $manager->register(Runtime::class); - $manager->setParameters($argv); - $class = $manager->search(); - if (!($class instanceof Command)) { - scan_directory(directory('app'), 'App'); - } - response()->send($manager->execCommand($class)); - } catch (\Throwable $exception) { - response()->send(logger()->exception($exception)); - } finally { - Timer::clearAll(); + try { + /** @var Console $manager */ + $manager = Snowflake::app()->get('console'); + $manager->register(Runtime::class); + $manager->setParameters($argv); + $class = $manager->search(); + if (!($class instanceof Command)) { + scan_directory(directory('app'), 'App'); } - }); + response()->send($manager->execCommand($class)); + } catch (\Throwable $exception) { + response()->send(logger()->exception($exception)); + } finally { + Timer::clearAll(); + } } /**