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 2021/07/01 00:38:56 UTC
[GitHub] [camel-k] claudio4j commented on a change in pull request #2467: fix(cli) Duplicated trait set as modeline and kamel run parameters causes error
claudio4j commented on a change in pull request #2467:
URL: https://github.com/apache/camel-k/pull/2467#discussion_r661895625
##########
File path: pkg/cmd/run.go
##########
@@ -801,6 +800,8 @@ func resolvePodTemplate(ctx context.Context, templateSrc string, spec *v1.Integr
func configureTraits(options []string, catalog *trait.Catalog) (map[string]v1.TraitSpec, error) {
traits := make(map[string]map[string]interface{})
+ // remove any duplicate trait parameters in case it is set as modeline or command line parameters
+ util.StringsSliceRemoveDuplicates(&options)
Review comment:
Now the code checks for trait names only and the cli traits has precedence.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org