From e726c7323e9778e5bf9f704a32d5d23196c3183f Mon Sep 17 00:00:00 2001 From: gladtoeatu Date: Wed, 27 Nov 2024 16:49:28 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E4=BA=8B=E4=BB=B6=EF=BC=8C=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=20(#132)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: frank --- src/Core/Subscriber/BootApplicationSubscriber.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Subscriber/BootApplicationSubscriber.php b/src/Core/Subscriber/BootApplicationSubscriber.php index a2b2b45..04dd56f 100644 --- a/src/Core/Subscriber/BootApplicationSubscriber.php +++ b/src/Core/Subscriber/BootApplicationSubscriber.php @@ -44,10 +44,10 @@ public function process(object $event): void } if ($event instanceof AfterExecute) { $command = $event->getCommand(); - if ($command instanceof GenMigrateCommand) { + if ($command instanceof GenMigrateCommand && is_dir(BASE_PATH . '/migrations')) { Filesystem::copy(BASE_PATH . '/migrations', BASE_PATH . '/databases/migrations'); } - if ($command instanceof GenSeederCommand) { + if ($command instanceof GenSeederCommand && is_dir(BASE_PATH . '/seeders')) { Filesystem::copy(BASE_PATH . '/seeders', BASE_PATH . '/databases/seeders'); } }