From 9729de32484ee82d6135e9b9af5c0d00d2d096a9 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 23 Feb 2024 08:27:08 -0800 Subject: [PATCH] chore: Minor syntax correction, add missing return code check --- src/ublue_update/cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ublue_update/cli.py b/src/ublue_update/cli.py index 90e1d1f..19724b4 100644 --- a/src/ublue_update/cli.py +++ b/src/ublue_update/cli.py @@ -119,12 +119,19 @@ def run_updates(system, system_update_available): [ "/usr/bin/topgrade", "--config", - "/usr/share/ublue-update/topgrade-system.toml" + "/usr/share/ublue-update/topgrade-system.toml", ], capture_output=True, ) log.debug(out.stdout.decode("utf-8")) + if out.returncode != 0: + print( + f"topgrade returned code {out.returncode}, program output:" + ) + print(out.stdout.decode("utf-8")) + os._exit(out.returncode) + """Users""" for user in users: try: