From 5246ba4624a6195250a68ba400350beb5af97a1c Mon Sep 17 00:00:00 2001 From: Matt Dawkins Date: Tue, 27 Jan 2026 11:06:23 -0500 Subject: [PATCH] fix: exit with error code when CLI filepath does not exist pipeline_filepath_validator called ctx.exit() which exits with code 0 (success) when the input file does not exist. Use click.BadParameter instead, which prints a proper error message and exits with a non-zero status code. Co-Authored-By: Claude Opus 4.5 --- batbot/batbot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/batbot/batbot.py b/batbot/batbot.py index fa137e0..c529d0c 100755 --- a/batbot/batbot.py +++ b/batbot/batbot.py @@ -13,8 +13,7 @@ def pipeline_filepath_validator(ctx, param, value): if not exists(value): - log.error(f'Input filepath does not exist: {value}') - ctx.exit() + raise click.BadParameter(f'Input filepath does not exist: {value}') return value