Skip to content

Commit

Permalink
Merge pull request #27 from yifanfu/exit-standalone-task-with-correct…
Browse files Browse the repository at this point in the history
…-code

run-task.py should exit with correct code
  • Loading branch information
lzrocha authored Mar 20, 2024
2 parents bee86e7 + 6e2020a commit fd13e48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/run-task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

0 comments on commit fd13e48

Please sign in to comment.