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'); } }