From cf60b164c523ff031bd88f41b2461ba74a84af1b Mon Sep 17 00:00:00 2001 From: Manu Date: Wed, 11 Dec 2024 13:22:32 +0000 Subject: [PATCH] Deal with case of missing PATH --- src/vorta/borg/borg_job.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vorta/borg/borg_job.py b/src/vorta/borg/borg_job.py index 337829e07..2bfc5e730 100644 --- a/src/vorta/borg/borg_job.py +++ b/src/vorta/borg/borg_job.py @@ -207,7 +207,8 @@ def prepare_bin(cls): # More info at https://github.com/borgbase/vorta/issues/2100 # Set the path to also find homebrew installs of Borg, and avoid falling back to the embedded binary. if sys.platform == 'darwin': - os.environ["PATH"] += ":/opt/homebrew/bin:/usr/local/bin" + current_path = os.environ.get("PATH", "") + os.environ["PATH"] = f"{current_path}:/opt/homebrew/bin:/usr/local/bin" # Now continue looking for the borg binary to use borg_in_path = shutil.which('borg')