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; }