diff --git a/src/heretic/main.py b/src/heretic/main.py index b731ab5..a0c7e98 100644 --- a/src/heretic/main.py +++ b/src/heretic/main.py @@ -1549,6 +1549,11 @@ def run(): else: print(f"[red]Error: {formatted}[/]") + # A predefined action is not retried, so without this, a failed + # headless run would exit as if it had succeeded. + if settings.model_action is not None: + sys.exit(1) + def main(): rich.traceback.install()