From de6470fd0e25d19d8d2f2469904038e02b716c1c Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sat, 20 Jun 2020 09:13:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9D=97=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../catcher/command/install/InstallModuleServiceCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extend/catcher/command/install/InstallModuleServiceCommand.php b/extend/catcher/command/install/InstallModuleServiceCommand.php index 119ef8b..684af1e 100644 --- a/extend/catcher/command/install/InstallModuleServiceCommand.php +++ b/extend/catcher/command/install/InstallModuleServiceCommand.php @@ -11,6 +11,7 @@ namespace catcher\command\install; use catcher\CatchAdmin; +use Doctrine\DBAL\Types\DateImmutableType; use think\console\Command; use think\console\Input; use think\console\input\Option; @@ -20,7 +21,7 @@ class InstallModuleServiceCommand extends Command { protected function configure() { - $this->setName('catch-module:service') + $this->setName('catch-service:discover') ->addOption('module', '-m',Option::VALUE_REQUIRED, 'module name') ->setDescription('install catch module service'); } @@ -105,8 +106,7 @@ PHP if (!$module) { $modules = CatchAdmin::getModulesDirectory(); foreach ($modules as $module) { - $m = explode(DIRECTORY_SEPARATOR, $module); - + $m = explode(DIRECTORY_SEPARATOR, trim($module, DIRECTORY_SEPARATOR)); $moduleNames[] = array_pop($m); }