Skip to content

Commit

Permalink
🦄 refactor: 优化订阅事件,处理目录不存在时的提示 (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: frank <[email protected]>
  • Loading branch information
gladtoeatu and frank authored Nov 27, 2024
1 parent 3301859 commit 9a99b8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Subscriber/BootApplicationSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Expand Down

0 comments on commit 9a99b8f

Please sign in to comment.