This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push: new 34bc81d fix(cli): Kamel CLI zero-code exists when trait properties validation fails 34bc81d is described below commit 34bc81d35932caf51c4e88cc52c903931d9950f1 Author: Antonin Stefanutti <anto...@stefanutti.fr> AuthorDate: Mon Jan 31 09:35:51 2022 +0100 fix(cli): Kamel CLI zero-code exists when trait properties validation fails --- pkg/cmd/run.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go index 4721fef..516099d 100644 --- a/pkg/cmd/run.go +++ b/pkg/cmd/run.go @@ -297,8 +297,7 @@ func (o *runCmdOptions) run(cmd *cobra.Command, args []string) error { prefix = prefix[0:strings.Index(prefix, "[")] } if !util.StringSliceExists(tp, prefix) { - fmt.Printf("Error: %s is not a valid trait property\n", t) - return nil + return fmt.Errorf("%s is not a valid trait property", t) } }