* Display an error message if a mandatory option does not have a value. * Called after checking for help flags in leaf subcommand. * * @private
()
| 1685 | */ |
| 1686 | |
| 1687 | _checkForMissingMandatoryOptions() { |
| 1688 | // Walk up hierarchy so can call in subcommand after checking for displaying help. |
| 1689 | this._getCommandAndAncestors().forEach((cmd) => { |
| 1690 | cmd.options.forEach((anOption) => { |
| 1691 | if ( |
| 1692 | anOption.mandatory && |
| 1693 | cmd.getOptionValue(anOption.attributeName()) === undefined |
| 1694 | ) { |
| 1695 | cmd.missingMandatoryOptionValue(anOption); |
| 1696 | } |
| 1697 | }); |
| 1698 | }); |
| 1699 | } |
| 1700 | |
| 1701 | /** |
| 1702 | * Display an error message if conflicting options are used together in this. |
no test coverage detected