Skip to content

Commit a2547e9

Browse files
authored
lifecycle: fix ak exit status not being passed (#12024)
* lifecycle: fix ak exit status not being passed Signed-off-by: Jens Langhammer <[email protected]> * use waitstatus_to_exitcode Signed-off-by: Jens Langhammer <[email protected]> --------- Signed-off-by: Jens Langhammer <[email protected]>
1 parent 14d0136 commit a2547e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lifecycle/ak.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
"""Wrapper for lifecycle/ak, to be installed by poetry"""
22

3-
from os import system
3+
from os import system, waitstatus_to_exitcode
44
from pathlib import Path
5-
from sys import argv
5+
from sys import argv, exit
66

77

88
def main():
99
"""Wrapper around ak bash script"""
1010
current_path = Path(__file__)
1111
args = " ".join(argv[1:])
12-
system(f"{current_path.parent}/ak {args}") # nosec
12+
res = system(f"{current_path.parent}/ak {args}") # nosec
13+
exit_code = waitstatus_to_exitcode(res)
14+
exit(exit_code)
1315

1416

1517
if __name__ == "__main__":

0 commit comments

Comments
 (0)