We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6718f5f commit dd5d55dCopy full SHA for dd5d55d
src/Components/Database/Migrator.php
@@ -16,6 +16,7 @@
16
use Illuminate\Database\Migrations\Migrator as BaseMigrator;
17
use Illuminate\Support\Str;
18
use SplFileInfo;
19
+use Symfony\Component\Finder\Exception\DirectoryNotFoundException;
20
use Symfony\Component\Finder\Finder;
21
22
use function collect;
@@ -43,8 +44,12 @@ function ($path) {
43
44
->files()
45
->name(basename($path));
46
} else {
- $finder = (new Finder)->in([$path])
47
- ->files();
+ try {
48
+ $finder = (new Finder)->in([$path])
49
+ ->files();
50
+ } catch (DirectoryNotFoundException $e) {
51
+ return [];
52
+ }
53
}
54
55
return collect($finder)
0 commit comments