You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2018/10/31 07:49:43 UTC

[GitHub] nicolaferraro closed pull request #200: Cannot configure traits

nicolaferraro closed pull request #200: Cannot configure traits
URL: https://github.com/apache/camel-k/pull/200
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pkg/client/cmd/run.go b/pkg/client/cmd/run.go
index de994430..0778b073 100644
--- a/pkg/client/cmd/run.go
+++ b/pkg/client/cmd/run.go
@@ -129,7 +129,9 @@ func (o *runCmdOptions) validateArgs(cmd *cobra.Command, args []string) error {
 func (o *runCmdOptions) run(cmd *cobra.Command, args []string) error {
 	tp := trait.ComputeTraitsProperties()
 	for _, t := range o.Traits {
-		if !util.StringSliceExists(tp, t) {
+		kv := strings.SplitN(t, "=", 2)
+
+		if !util.StringSliceExists(tp, kv[0]) {
 			fmt.Printf("Error: %s is not a valid trait property\n", t)
 			return nil
 		}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services