diff --git a/src/Components/Database/Migrator.php b/src/Components/Database/Migrator.php index 5011110..eabf64a 100644 --- a/src/Components/Database/Migrator.php +++ b/src/Components/Database/Migrator.php @@ -16,6 +16,7 @@ use Illuminate\Database\Migrations\Migrator as BaseMigrator; use Illuminate\Support\Str; use SplFileInfo; +use Symfony\Component\Finder\Exception\DirectoryNotFoundException; use Symfony\Component\Finder\Finder; use function collect; @@ -43,8 +44,12 @@ function ($path) { ->files() ->name(basename($path)); } else { - $finder = (new Finder)->in([$path]) - ->files(); + try { + $finder = (new Finder)->in([$path]) + ->files(); + } catch (DirectoryNotFoundException $e) { + return []; + } } return collect($finder)