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):