doru1004 opened a new issue #1843:
URL: https://github.com/apache/camel-k/issues/1843


   In the current implementation modeline options take precedence over the same 
user-provided options. It feels like this should be the other way around i.e. 
if a user mentions an option on the command line, that option should overwrite 
any modeline option with the same name.
   
   Modeline options are currently inserted at the end of the original command 
line which means that they overwrite any identical options that appear earlier 
in the command line.
   
   User wrote:
   ```
   kamel run -p prop1=val1 file.yaml
   ```
   
   file.yaml:
   ```
   # camel-k: property prop1=val2
   ```
   
   After modeline options are extracted:
   ```
   kamel run -p prop1=val1 file.yaml --property prop1=val2
   ```
   
   prop1 will have val2. Instead, prop1 should have val1 and the modeline prop1 
should not have been extracted at all. The command line after modeline should 
be:
   ```
   kamel run -p prop1=val1 file.yaml
   ```
   
   Thoughts?


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to