This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a1667f  Cannot configure traits #199
5a1667f is described below

commit 5a1667f594d1d126b6b924407af56332eddd8ff0
Author: lburgazzoli <lburgazz...@gmail.com>
AuthorDate: Wed Oct 31 00:26:36 2018 +0100

    Cannot configure traits #199
---
 pkg/client/cmd/run.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/client/cmd/run.go b/pkg/client/cmd/run.go
index de99443..0778b07 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
                }

Reply via email to