File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 1414use App \Event \RepoStatusChangedEvent ;
1515use App \Service \Cache ;
1616use Cz \Git \GitException ;
17+ use InvalidArgumentException ;
1718use Psr \Log \LoggerInterface ;
1819use Symfony \Component \Cache \Simple \FilesystemCache ;
1920use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
@@ -179,12 +180,16 @@ public function getRecipeDirectories()
179180 return [];
180181 }
181182
182- $ finder = new Finder ();
183- return $ finder ->ignoreUnreadableDirs ()
184- ->in ($ this ->fullRepoPath . '/*/* ' )
185- ->depth (0 )
186- ->exclude ('.git ' )
187- ->directories ();
183+ try {
184+ return (new Finder ())
185+ ->ignoreUnreadableDirs ()
186+ ->in ($ this ->fullRepoPath . '/*/* ' )
187+ ->depth (0 )
188+ ->exclude ('.git ' )
189+ ->directories ();
190+ } catch (InvalidArgumentException $ e ) {
191+ return [];
192+ }
188193 }
189194
190195 /**
@@ -272,6 +277,4 @@ public function jsonSerialize()
272277 'url ' => $ this ->repoUrl
273278 ];
274279 }
275-
276-
277280}
You can’t perform that action at this time.
0 commit comments