You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/12/03 21:21:35 UTC

[GitHub] [camel-k] doru1004 opened a new issue #1843: Option priority

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:
users@infra.apache.org



[GitHub] [camel-k] nicolaferraro commented on issue #1843: Lower priority of modeline options

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #1843:
URL: https://github.com/apache/camel-k/issues/1843#issuecomment-738755456


   Yes, I think what you're suggesting is the right way to handle those params


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-k] doru1004 commented on issue #1843: Lower priority of modeline options

Posted by GitBox <gi...@apache.org>.
doru1004 commented on issue #1843:
URL: https://github.com/apache/camel-k/issues/1843#issuecomment-742834219


   Opened a PR about this: https://github.com/apache/camel-k/pull/1857
   


----------------------------------------------------------------
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:
users@infra.apache.org