diff --git a/src/Components/Database/Migrator.php b/src/Components/Database/Migrator.php index a958207e..258b242d 100644 --- a/src/Components/Database/Migrator.php +++ b/src/Components/Database/Migrator.php @@ -17,6 +17,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; /** @@ -42,8 +43,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)