This commit is contained in:
2025-12-31 01:50:09 +08:00
parent 79d4f47a67
commit 6a27fa3b74
+6 -6
View File
@@ -70,14 +70,14 @@ class Application extends BaseApplication
*/ */
public function beforeCommandExecute(OnBeforeCommandExecute $beforeCommandExecute): void public function beforeCommandExecute(OnBeforeCommandExecute $beforeCommandExecute): void
{ {
if (!($beforeCommandExecute->command instanceof ServerCommand)) { if ($beforeCommandExecute->command instanceof ServerCommand) {
$scanner = $this->container->get(Scanner::class); if (config('servers.reload.hot', false) === false) {
$scanner->scan(APP_PATH . 'app/'); return;
} else if (config('site.reload.hot', false) === false) {
$scanner = $this->container->get(Scanner::class);
$scanner->scan(APP_PATH . 'app/');
} }
} }
$scanner = $this->container->get(Scanner::class);
$scanner->scan(APP_PATH . 'app/');
}
/** /**