public static void failIfOptionDoesntMeetRequirement(
      final CommandLine commandLine,
      final String errorMessage,
      final boolean requirement,
      final List<String> dependentOptionsNames) {
    if (!requirement) {
      final String affectedOptions = getAffectedOptions(commandLine, dependentOptionsNames);

      if (!affectedOptions.isEmpty()) {
        throw new CommandLine.ParameterException(
            commandLine, errorMessage + " [" + affectedOptions + "]");
      }
    }
  }
Fail if option doesn't meet requirement.

@param commandLine the command line
@param errorMessage the error message
@param requirement the requirement
@param dependentOptionsNames the dependent options names
app/src/main/java/org/hyperledger/besu/cli/util/CommandLineUtils.java