From 2ead8cc31b85b2223d543fce5a30c32cc1c12515 Mon Sep 17 00:00:00 2001 From: bom Date: Tue, 18 Jul 2023 12:18:09 +0200 Subject: [PATCH] Handle failed execution in execute_live --- src/main/python/ddadevops/infrastructure/infrastructure.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/python/ddadevops/infrastructure/infrastructure.py b/src/main/python/ddadevops/infrastructure/infrastructure.py index 3459d6e..1565064 100644 --- a/src/main/python/ddadevops/infrastructure/infrastructure.py +++ b/src/main/python/ddadevops/infrastructure/infrastructure.py @@ -112,7 +112,9 @@ class ExecutionApi: for line in iter(process.stdout.readline, b""): print(line.decode("utf-8"), end="") process.stdout.close() - process.wait() + return_code = process.wait() + if return_code != 0: + raise RuntimeError(f"Execute live failed with code: {return_code}") class EnvironmentApi: