From 6e2020aa9fc1f57e1337fde5108fe13dc103e582 Mon Sep 17 00:00:00 2001 From: Yifan Fu <2436665+yifanfu@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:48:41 +1100 Subject: [PATCH] run-task.py should exit with correct code --- src/run-task.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/run-task.py b/src/run-task.py index f2bc80c..0efd781 100755 --- a/src/run-task.py +++ b/src/run-task.py @@ -129,3 +129,7 @@ print('Exit code: %s' %running_task['tasks'][0]['containers'][0]['exitCode']) if 'reason' in running_task['tasks'][0]['containers'][0]: print('Reason: %s' %running_task['tasks'][0]['containers'][0]['reason']) + +# exit with task exit code +if 'exitCode' in running_task['tasks'][0]['containers'][0]: + exit(running_task['tasks'][0]['containers'][0]['exitCode'])