From 49a9f7454d765437cdb9a8289ecd04ee074aba36 Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Sat, 15 Jun 2024 06:52:06 -0400 Subject: [PATCH] fix: Add try except to log error for clearer reason for failure (#118) --- src/ublue_update/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ublue_update/cli.py b/src/ublue_update/cli.py index 12af882..e46987f 100644 --- a/src/ublue_update/cli.py +++ b/src/ublue_update/cli.py @@ -254,4 +254,8 @@ def main(): # system checks passed log.info("System passed all update checks") - run_updates(cli_args.system, system_update_available) + try: + run_updates(cli_args.system, system_update_available) + except Exception as e: + log.info(f"Failed to update: {e}") + os._exit(1)