From a2547e928d048a8d58d008feb0c1594ca52e302d Mon Sep 17 00:00:00 2001 From: "Jens L." Date: Thu, 14 Nov 2024 15:33:03 +0100 Subject: [PATCH] lifecycle: fix ak exit status not being passed (#12024) * lifecycle: fix ak exit status not being passed Signed-off-by: Jens Langhammer * use waitstatus_to_exitcode Signed-off-by: Jens Langhammer --------- Signed-off-by: Jens Langhammer --- lifecycle/ak.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lifecycle/ak.py b/lifecycle/ak.py index b17c070ab7..5a7bc6e28f 100644 --- a/lifecycle/ak.py +++ b/lifecycle/ak.py @@ -1,15 +1,17 @@ """Wrapper for lifecycle/ak, to be installed by poetry""" -from os import system +from os import system, waitstatus_to_exitcode from pathlib import Path -from sys import argv +from sys import argv, exit def main(): """Wrapper around ak bash script""" current_path = Path(__file__) args = " ".join(argv[1:]) - system(f"{current_path.parent}/ak {args}") # nosec + res = system(f"{current_path.parent}/ak {args}") # nosec + exit_code = waitstatus_to_exitcode(res) + exit(exit_code) if __name__ == "__main__":