modify
This commit is contained in:
+14
-16
@@ -136,23 +136,21 @@ class Application extends BaseApplication
|
|||||||
*/
|
*/
|
||||||
public function start(Input $argv): void
|
public function start(Input $argv): void
|
||||||
{
|
{
|
||||||
run(function () use ($argv) {
|
try {
|
||||||
try {
|
/** @var Console $manager */
|
||||||
/** @var Console $manager */
|
$manager = Snowflake::app()->get('console');
|
||||||
$manager = Snowflake::app()->get('console');
|
$manager->register(Runtime::class);
|
||||||
$manager->register(Runtime::class);
|
$manager->setParameters($argv);
|
||||||
$manager->setParameters($argv);
|
$class = $manager->search();
|
||||||
$class = $manager->search();
|
if (!($class instanceof Command)) {
|
||||||
if (!($class instanceof Command)) {
|
scan_directory(directory('app'), 'App');
|
||||||
scan_directory(directory('app'), 'App');
|
|
||||||
}
|
|
||||||
response()->send($manager->execCommand($class));
|
|
||||||
} catch (\Throwable $exception) {
|
|
||||||
response()->send(logger()->exception($exception));
|
|
||||||
} finally {
|
|
||||||
Timer::clearAll();
|
|
||||||
}
|
}
|
||||||
});
|
response()->send($manager->execCommand($class));
|
||||||
|
} catch (\Throwable $exception) {
|
||||||
|
response()->send(logger()->exception($exception));
|
||||||
|
} finally {
|
||||||
|
Timer::clearAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user