Skip to content

Commit

Permalink
[improve][cli] Pulsar shell: fix custom commands autocompletion (#17479)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi authored Sep 7, 2022
1 parent 5fce0ce commit 1d907b7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ private void addCommand(Map.Entry<String, Class<?>> c, Supplier<PulsarAdmin> adm
jcommander.addCommand(c.getKey(), c.getValue().getConstructor(Supplier.class).newInstance(admin));
} else {
// Other mode, all components are initialized.
jcommander.addCommand(c.getKey(), c.getValue().getConstructor(Supplier.class).newInstance(admin));
if (c.getValue() != null) {
jcommander.addCommand(c.getKey(), c.getValue().getConstructor(Supplier.class).newInstance(admin));
}
}
}

Expand Down

0 comments on commit 1d907b7

Please sign in to comment.