Skip to content

Commit

Permalink
Fix duplicate short option name for hostname and help
Browse files Browse the repository at this point in the history
  • Loading branch information
CrushedPixel authored and games647 committed Apr 2, 2020
1 parent 07ed3eb commit 859d5e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private CommandLineParser() {
autoRegisterOption = new Option("r", "register", false, "Makes Bots run the /register and /login command after joining with username and password being " + LambdaAttack.PROJECT_NAME);
options.addOption(autoRegisterOption);

helpOption = new Option("h", "help", false, "Displays this help page");
helpOption = new Option(null, "help", false, "Displays this help page");
options.addOption(helpOption);
}

Expand All @@ -91,7 +91,7 @@ private void doParse(String[] args) throws ParseException {
}

private boolean shouldPrintHelp() {
return cmd.hasOption(helpOption.getOpt());
return cmd.hasOption(helpOption.getLongOpt());
}

private String getHostname() throws ParseException {
Expand Down

0 comments on commit 859d5e7

Please sign in to comment.