Skip pre-scan for hot reload build command

This commit is contained in:
2026-07-10 17:13:50 +08:00
parent 5c1282959c
commit ebcb7237ef
+2 -1
View File
@@ -21,6 +21,7 @@ use Symfony\Component\Console\{Application as ConsoleApplication,
Output\OutputInterface
};
use Kiri\Server\ServerCommand;
use Kiri\Server\FileBuildCommand;
use Kiri\Di\Inject\Container;
use function config;
@@ -73,7 +74,7 @@ class Application extends BaseApplication
*/
public function beforeCommandExecute(OnBeforeCommandExecute $beforeCommandExecute): void
{
if ($beforeCommandExecute->command instanceof ServerCommand) {
if ($beforeCommandExecute->command instanceof ServerCommand || $beforeCommandExecute->command instanceof FileBuildCommand) {
return;
}
$scanner = $this->container->get(Scanner::class);