You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/10/16 14:25:00 UTC
[jira] [Assigned] (CAMEL-25696) camel-jbang - A boolean option that is on by default is turned off when given without a value
[ https://issues.apache.org/jira/browse/CAMEL-25696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-25696:
-----------------------------------
Assignee: Claus Ibsen
> camel-jbang - A boolean option that is on by default is turned off when given without a value
> ---------------------------------------------------------------------------------------------
>
> Key: CAMEL-25696
> URL: https://issues.apache.org/jira/browse/CAMEL-25696
> Project: Camel
> Issue Type: Sub-task
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> picocli sets a boolean flag to the opposite of its default value when the flag is given without a value. For the options of the Camel CLI that are on by default, a bare flag therefore turns the option off: {{camel debug --stop-on-exit}} does not stop the integration on exit, and {{camel export --maven-wrapper}}, {{camel cmd receive --show-body}} or {{--logging-color}} turn the option off. A script or an AI agent that writes the flag to be explicit gets the opposite.
> 131 options are affected (the {{--download}}, {{--logging-color}}, {{--show-*}}, {{--maven-*-enabled}}, {{--lazy-bean}}, {{--docker}} families and more). CAMEL-25396 fixed {{--follow}} ({{log}}, {{trace}}, {{cmd receive}}, {{infra log}}) and {{hawtio --open-url}} with {{arity = "0..1", fallbackValue = "true"}}: a bare flag is true, {{--option=false}} still works, and a following name or file is not taken as the value.
> Proposal:
> * Do the same for every boolean option whose default is true, per option or once for the whole command tree.
> * A test that walks the command tree of {{CamelJBangMain}} and fails for a default-true boolean flag without a fallback value, so new options do not regress.
> * Upgrade guide: a bare flag turns the option on.
> _Claude Code on behalf of davsclaus (Claus Ibsen)_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)