* Lazy create help command. * * @return {(Command|null)} * @package
()
| 462 | * @package |
| 463 | */ |
| 464 | _getHelpCommand() { |
| 465 | const hasImplicitHelpCommand = |
| 466 | this._addImplicitHelpCommand ?? |
| 467 | (this.commands.length && |
| 468 | !this._actionHandler && |
| 469 | !this._findCommand('help')); |
| 470 | |
| 471 | if (hasImplicitHelpCommand) { |
| 472 | if (this._helpCommand === undefined) { |
| 473 | this.helpCommand(undefined, undefined); // use default name and description |
| 474 | } |
| 475 | return this._helpCommand; |
| 476 | } |
| 477 | return null; |
| 478 | } |
| 479 | |
| 480 | /** |
| 481 | * Add hook for life cycle event. |
no test coverage detected