davsclaus opened a new pull request, #29931:
URL: https://github.com/apache/camel/pull/29931

   Item 5 of [CAMEL-26930](https://issues.apache.org/jira/browse/CAMEL-26930).
   
   ## Problem
   
   `camel debug` starts a `camel run` with its own arguments, minus the options 
that only `camel debug` has. `Debug.removeDebugOnlyOptions` removed every 
argument that started with `--` plus the name of any field of `Debug`. So:
   
   - the field `source` (for `--source`) also removed `--source-dir=...`, and 
the run had no source directory;
   - a value given with a space stayed behind: `--breakpoint tick` left `tick`, 
which `camel run` took as a file ("File does not exist: tick", exit 66).
   
   There were no tests.
   
   ## Change
   
   `Debug.withoutDebugOnlyOptions` removes the options of `Debug` by their 
exact names (and aliases), from their `@Option` annotations, and with them 
their value: `--breakpoint=tick`, or `--breakpoint tick` for an option that 
takes a value. A flag, such as `--pretty`, does not take the next argument. 
This is the same shape as `BackgroundWait.withoutBackgroundOptions`.
   
   ## Tests
   
   - `DebugRunArgumentsTest` (new): `--source-dir` stays while `--source` goes; 
`--breakpoint tick`, `--breakpoint=tick`, `--log-lines=5` and `--show-headers` 
go, `--port` and the file stay; a flag does not take the file after it.
   - `DebugCommandTest` passes.
   - camel-jbang-run: 303 tests pass. camel-jbang-core: all pass 
(`DependencyUpdateTest` failed once and passed on the rerun, as on other 
branches).
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to