From aec58a9ad09cb61a9fededaec5563aae363be30d Mon Sep 17 00:00:00 2001 From: David Date: Fri, 29 Nov 2024 13:39:03 +0100 Subject: [PATCH] chore(ui-tests): raise click Exit exception --- frappe/commands/testing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/commands/testing.py b/frappe/commands/testing.py index fd0df6e2a4..46566ed5af 100644 --- a/frappe/commands/testing.py +++ b/frappe/commands/testing.py @@ -484,9 +484,9 @@ def run_ui_tests( click.secho("Running Cypress...", fg="yellow") try: frappe.commands.popen(formatted_command, cwd=app_base_path, raise_err=True) - except subprocess.CalledProcessError: + except subprocess.CalledProcessError as e: click.secho("Cypress tests failed", fg="red") - sys.exit(1) + raise click.exceptions.Exit(1) from e commands = [