davsclaus commented on code in PR #28763:
URL: https://github.com/apache/camel/pull/28763#discussion_r4430962179
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java:
##########
@@ -152,155 +163,277 @@ public void execute(String... args) {
quit(exitCode);
}
+ /**
+ * The command of the CLI that a command line runs, when the CLI needs to
create only that command: not for the
+ * help, the version, a command line that starts with an option, or the
commands that use the other commands or the
Review Comment:
Fixed in e6c2df245cff: it now says "a command line that starts with an
option (such as `--version`)"; `camel version get` creates only the `version`
command, as the test asserts.
_Claude Code on behalf of davsclaus_
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java:
##########
@@ -86,6 +86,10 @@
" 70:Internal error: an unexpected exception",
"124:Timed out: no reply from the integration in time" })
public class CamelJBangMain implements Callable<Integer> {
+ // the commands that need all the commands of the CLI: the shell and the
completion script use the others, and the
+ // plugins, which may add to any command, are loaded for run, export and
cmd (see PluginHelper.shouldDiscoverPlugins)
+ private static final Set<String> FULL_COMMANDS = Set.of("shell",
"completion", "run", "export", "cmd");
Review Comment:
Fixed in e6c2df245cff, without a second list to keep in sync:
`PluginHelper.isPluginConsumingCommand` (new) answers from
`PLUGIN_CONSUMING_BUILTINS`, and `FULL_COMMANDS` has only the commands that use
the other commands (`shell`, `completion`).
_Claude Code on behalf of davsclaus_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]