private static void validateCliOptions()

in java/com/google/cloud/deploymentmanager/autogen/cli/AutogenSettings.java [98:113]


  private static void validateCliOptions(CommandLine cmd) {
    List<String> errors = new ArrayList<>();
    if (cmd.hasOption(OPTION_SINGLE_INPUT) && cmd.hasOption(OPTION_BATCH_INPUT)) {
      errors.add("--single_input and --batch_input can't be used at the same time");
    } else if (!cmd.hasOption(OPTION_SINGLE_INPUT) && !cmd.hasOption(OPTION_BATCH_INPUT)) {
      errors.add("at least one of --single_input or --batch_input must be specified");
    }

    if (!errors.isEmpty()) {
      System.out.println("Error!");
      for (String error : errors) {
        System.out.println(error);
      }
      System.exit(1);
    }
  }