[
https://issues.apache.org/jira/browse/CAMEL-22992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18086575#comment-18086575
]
Claus Ibsen commented on CAMEL-22992:
-------------------------------------
_Claude Code on behalf of Claus Ibsen_
This issue has been fixed via an upstream fix in the Citrus Framework.
*Root cause:* The {{JBangSupport}} class in {{citrus-jbang-connector}} did not
handle Cygwin/Windows environments correctly. It always used {{cmd.exe /c}} +
{{jbang.cmd}} on Windows, even under Cygwin where {{/bin/bash -c}} + {{jbang}}
is needed. It also ignored the {{JBANG_LAUNCH_CMD}} environment variable set by
the parent JBang process.
*Fix:* [Citrus PR #1477|https://github.com/citrusframework/citrus/pull/1477]
(merged Feb 18, 2026) added Cygwin detection, {{JBANG_LAUNCH_CMD}} support, and
proper shell selection based on the executable path. This shipped in Citrus
4.9.3.
*Camel releases containing the fix:*
- *4.18.1+* (via Citrus bump to 4.10.0)
- *4.19.0+* (via Citrus bump to 4.9.4)
No code changes were needed in the Camel codebase itself — the fix was purely a
dependency version update.
> camel-jbang - Unable to use camel test plugin on a Windows
> ----------------------------------------------------------
>
> Key: CAMEL-22992
> URL: https://issues.apache.org/jira/browse/CAMEL-22992
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang, camel-test
> Affects Versions: 4.17.0, 4.18.0
> Environment: Windows
> Reporter: Dominik Jelinek
> Assignee: Christoph Deppisch
> Priority: Minor
> Fix For: 4.18.1, 4.19.0
>
> Attachments: Screenshot 2026-02-12 at 13.41.13.png
>
>
> For example init a new test file using
> {code:java}
> camel test init <filename>{code}
> or just call
> {code:java}
> camel test --help
> {code}
> on a macOS or Linux this is working just fine
>
> *Logs Output*
> {code:java}
> PS C:\Users\hudson\vscode-kaoto\test Fixture with speci@l
> chars\kaoto-view\example-tests> jbang '-Dcamel.jbang.version=4.17.0'
> camel@apache/camel test --help
> 2026-02-12 13:23:35.625 WARN 4300 --- [ main]
> org.citrusframework.jbang.JBangSupport : JBang installation not found.
> Downloading ...
> 2026-02-12 13:23:35.641 INFO 4300 --- [ main]
> org.citrusframework.jbang.JBangSupport : Using local JBang in
> C:\Users\hudson\.jbang
> 'C:\Users\hudson\.jbang\jbang\bin\jbang.cmd' is not recognized as an internal
> or external command,
> operable program or batch file. {code}
>
> Using a Citrus Framework through Citrus JBang plugin directly and executing
> is working just fine
> {code:java}
> citrus init <filename>{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)