2
0
Fork 0
mirror of https://github.com/ethauvin/rife2.git synced 2025-04-30 10:38:12 -07:00

Tweak to command registration

This commit is contained in:
Geert Bevin 2023-03-30 18:20:32 -04:00
parent 27e87d802f
commit e1d5546cca

View file

@ -162,14 +162,14 @@ public class BuildExecutor {
method.setAccessible(true);
var name = method.getName();
var annotation = method.getAnnotation(BuildCommand.class);
var annotation_name = annotation.value();
if (annotation_name != null && !annotation_name.isEmpty()) {
name = annotation_name;
}
if (!build_commands.containsKey(name)) {
var annotation = method.getAnnotation(BuildCommand.class);
var annotation_name = annotation.value();
if (annotation_name != null && !annotation_name.isEmpty()) {
name = annotation_name;
}
var build_help = annotation.help();
CommandHelp command_help = null;
if (build_help != null && build_help != CommandHelp.class) {