From 5dc6ac705b1d6030cafc3771de78289c5f8e2cf1 Mon Sep 17 00:00:00 2001 From: Nathan Dyer Date: Mon, 22 Jan 2024 14:51:31 -0500 Subject: [PATCH] Tell subprocess to check for non-zero exit codes so apt exceptions are handled. --- admin/bootstrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/bootstrap.py b/admin/bootstrap.py index 34cf1f2336..cf7d20521a 100755 --- a/admin/bootstrap.py +++ b/admin/bootstrap.py @@ -110,9 +110,9 @@ def is_missing_dependency() -> bool: try: sdlog.info("Checking apt dependencies are installed") - apt_query_result = subprocess.run(apt_query, capture_output=True, text=True) + apt_query_result = subprocess.run(apt_query, capture_output=True, text=True, check=True) - # If any packages are marked as not installed, return 0 + # If any packages are marked as not installed, we are missing dependencies if "Installed: (none)" in apt_query_result.stdout: return True