From 78f9728ae3e4cfd2ab9d51305614fcd9adec10c2 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Fri, 24 Feb 2023 17:17:04 +0800 Subject: [PATCH 1/2] chore --- app/Providers/RouteServiceProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index a825fa6..7135c15 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -41,7 +41,9 @@ class RouteServiceProvider extends ServiceProvider $this->booted(function(){ $this->app->booted(function (){ - loadCachedAdminRoutes(); + if (file_exists('loadCachedAdminRoutes')) { + loadCachedAdminRoutes(); + } }); }); } From 5ddfb0b5aa5b7738b9ce1f401d3630301eed12f5 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sun, 26 Feb 2023 19:15:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E6=8D=95=E8=8E=B7=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/Develop/Support/ModuleInstall.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/Develop/Support/ModuleInstall.php b/modules/Develop/Support/ModuleInstall.php index 0d47ab4..8ad99bd 100644 --- a/modules/Develop/Support/ModuleInstall.php +++ b/modules/Develop/Support/ModuleInstall.php @@ -46,9 +46,15 @@ class ModuleInstall */ protected function installWithTitle(string $title): void { - $installer = CatchAdmin::getModuleInstaller($title); + try { + $installer = CatchAdmin::getModuleInstaller($title); - $installer->install(); + $installer->install(); + } catch (\Exception|\Throwable $e) { + CatchAdmin::deleteModulePath($title); + + throw new FailedException('安装失败: ' . $e->getMessage()); + } } /**