mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 06:04:34 -04:00
try/catch for react builder
This commit is contained in:
parent
64001c2a40
commit
c6dac6bfb9
@ -48,8 +48,16 @@ class ReactBuilder extends Command
|
|||||||
{
|
{
|
||||||
$includes = '';
|
$includes = '';
|
||||||
|
|
||||||
$directoryIterator = new \RecursiveDirectoryIterator(public_path('react/v'.config('ninja.app_version').'/'), \RecursiveDirectoryIterator::SKIP_DOTS);
|
$directoryIterator = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$directoryIterator = new \RecursiveDirectoryIterator(public_path('react/v'.config('ninja.app_version').'/'), \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||||
|
}
|
||||||
|
catch (\Exception $e) {
|
||||||
|
$this->error('React files not found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
|
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
|
||||||
if ($file->getExtension() == 'js') {
|
if ($file->getExtension() == 'js') {
|
||||||
if (str_contains($file->getFileName(), 'index-')) {
|
if (str_contains($file->getFileName(), 'index-')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user