From f1395d4b6def9da6bc3cd67397b5bdb5e80c7e5e Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 9 Feb 2024 19:00:20 +0100 Subject: [PATCH] Re-apply fix for binary detection in gui --- gui/src/services/goldwarden.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gui/src/services/goldwarden.py b/gui/src/services/goldwarden.py index 4937412..af78447 100644 --- a/gui/src/services/goldwarden.py +++ b/gui/src/services/goldwarden.py @@ -10,6 +10,7 @@ if is_flatpak: log_directory = str(Path.home()) + "/.var/app/com.quexten.goldwarden/data/goldwarden" os.makedirs(log_directory, exist_ok=True) +# detect goldwarden binary BINARY_PATHS = [ "/app/bin/goldwarden", "/usr/bin/goldwarden", @@ -22,8 +23,16 @@ for path in BINARY_PATHS: if os.path.exists(path): BINARY_PATH = path break + if BINARY_PATH == None: - raise Exception("Could not find goldwarden binary") + BINARY_PATH = which('goldwarden') + if isinstance(BINARY_PATH,str): + BINARY_PATH = BINARY_PATH.strip() + +if BINARY_PATH == None: + print("goldwarden executable not found") + sys.exit() + authenticated_connection = None def create_authenticated_connection(token):