Skip to content

Commit

Permalink
Fix null help entries being added to the generated help
Browse files Browse the repository at this point in the history
  • Loading branch information
Revxrsal committed Apr 27, 2022
1 parent 7544559 commit e011bfe
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public Resolver(BaseCommandHandler handler) {
CommandPath parentPath = parent == null ? null : parent.getPath();
handler.executables.values().stream().sorted().forEach(c -> {
if (parentPath == null || parentPath.isParentOf(c.getPath())) {
if (c != helpCommand)
entries.add(writer.generate(c, context.actor()));
if (c != helpCommand) {
Object generated = writer.generate(c, context.actor());
if (generated != null) entries.add(generated);
}
}
});
return entries;
Expand Down

0 comments on commit e011bfe

Please sign in to comment.