Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[BZ 1073096] - Simplifying the code: fail fast is --help option is pr…
Browse files Browse the repository at this point in the history
…esent.
  • Loading branch information
jkremser committed Mar 18, 2014
1 parent 705dca8 commit 589b486
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,11 @@ public boolean accept(File dir, String name) {
}

private void validateInstallCommand(ControlCommand command, String[] args) {
if (!"install".equalsIgnoreCase(command.getName())) {
// just return if we're asking for help or if it is not an install command
if (!"install".equalsIgnoreCase(command.getName()) || isHelp(args)) {
return;
}

// just return if we're asking for help
List<String> argsList = Arrays.asList(args);
if (argsList.contains("--help")) {
return;
}

// don't perform validation for components not involved in the command
boolean validateServer = argsList.contains("--server")
Expand Down

0 comments on commit 589b486

Please sign in to comment.