Bug fix: Now handles that "summary" does not require any arguments.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2970963002 .
This commit is contained in:
Erik Ernst 2017-07-06 13:13:16 +02:00
parent 4174896332
commit e451f16db0

View file

@ -17,10 +17,9 @@ main(List<String> args) async {
ArgParser argParser = createArgParser();
ArgResults argResults = argParser.parse(args);
processArgResults(argResults);
if (argResults.rest.length == 0 || argResults['help']) {
if (argResults['help']) {
help(argParser);
if (argResults['help']) return;
exit(1);
return;
}
var bot = new Bot(logdog: argResults['logdog']);