From 6e1fdb2b7489cbcac6f90d9f6a8ec9c428453ebc Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sun, 19 Jul 2020 08:46:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9D=97=E4=B8=8B?= =?UTF-8?q?=20commands=20=E5=9C=A8cli=E6=A8=A1=E5=BC=8F=E4=B8=8B=E6=B3=A8?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/ModuleService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extend/catcher/ModuleService.php b/extend/catcher/ModuleService.php index e9f9149..d65de6c 100644 --- a/extend/catcher/ModuleService.php +++ b/extend/catcher/ModuleService.php @@ -52,7 +52,7 @@ abstract class ModuleService extends Service */ protected function registerCommands() { - if (method_exists($this,'loadCommands')) { + if (method_exists($this,'loadCommands') && $this->app->runningInConsole()) { list($namespace, $path) = $this->loadCommands(); $catchConsole = $this->app['catch_console'];