From f3444d8bdd1ab050cebf393c1a3096c6f330684d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 8 Sep 2020 11:06:42 +0800 Subject: [PATCH] e --- Console/AbstractConsole.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Console/AbstractConsole.php b/Console/AbstractConsole.php index 24911024..bf125149 100644 --- a/Console/AbstractConsole.php +++ b/Console/AbstractConsole.php @@ -67,12 +67,20 @@ abstract class AbstractConsole extends Component { $name = $this->parameters->getCommandName(); $this->parameters->set('commandList', $this->getCommandList()); + + $help = 'help'; foreach ($this->commands as $command) { + if ($command->command == $help) { + $help = $command; + } if ($command->command != $name) { continue; } return $command; } + if (is_object($help)) { + return $help; + } return null; }