From 48921d4584068fadb0f776ed7e81c21d89172e2e Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 11 May 2021 10:50:35 -0700 Subject: [PATCH] ensure exit code never exceeds 255 --- jc/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jc/cli.py b/jc/cli.py index 20145bee..553b8baa 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -476,7 +476,10 @@ def run_user_command(command): def combined_exit_code(program_exit=0, jc_exit=0): - return program_exit + jc_exit + exit_code = program_exit + jc_exit + if exit_code > 255: + exit_code = 255 + return exit_code def main():