You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2020/01/07 19:23:37 UTC
[camel-k] branch master updated: fix: Avoid potential nil pointer
dereference in wait & dev modes
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton 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 268cdc5 fix: Avoid potential nil pointer dereference in wait & dev modes
268cdc5 is described below
commit 268cdc5eadab523fdf1237602145ba70e2369349
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Jan 7 11:11:23 2020 +0000
fix: Avoid potential nil pointer dereference in wait & dev modes
---
pkg/cmd/run.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 60f6896..10fe7df 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -207,11 +207,11 @@ func (o *runCmdOptions) run(cmd *cobra.Command, args []string) error {
return err
}
- if *integrationPhase == v1.IntegrationPhaseRunning {
+ if integrationPhase == nil || *integrationPhase == v1.IntegrationPhaseError {
+ return fmt.Errorf("integration \"%s\" deployment failed", integration.Name)
+ } else if *integrationPhase == v1.IntegrationPhaseRunning {
fmt.Println("Running")
break
- } else if integrationPhase == nil || *integrationPhase == v1.IntegrationPhaseError {
- return fmt.Errorf("integration \"%s\" deployment failed", integration.Name)
}
// The integration watch timed out so recreate it using the latest integration resource version