fix: Avoid potential nil pointer dereference in wait & dev modes
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 @@
 				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