Skip to content

Commit

Permalink
Main: check configuration and print usage if module name is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Dec 16, 2011
1 parent adb12b9 commit f0d66bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spi/src/main/java/ceylon/modules/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,17 @@ public void printUsage() {
);
System.exit(1);
}

public void check() {
if(executable == null
|| executable.isEmpty()){
System.err.println("Missing +executable parameter\n");
printUsage();
}
if(module == null
|| module.isEmpty()){
System.err.println("Missing module name\n");
printUsage();
}
}
}
1 change: 1 addition & 0 deletions spi/src/main/java/ceylon/modules/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private static Configuration parseArgs(String[] args) {
break;
}
}
conf.check();
return conf;
}

Expand Down

0 comments on commit f0d66bb

Please sign in to comment.