diff --git a/src/vorta/borg/borg_job.py b/src/vorta/borg/borg_job.py index b66acc2d..1f17793a 100644 --- a/src/vorta/borg/borg_job.py +++ b/src/vorta/borg/borg_job.py @@ -203,7 +203,12 @@ class BorgJob(JobInterface, BackupProfileMixin): @classmethod def prepare_bin(cls): """Find packaged borg binary. Prefer globally installed.""" - + # On MacOS, the PATH environment variable does not seem to be set when run as a pyinstaller binary. + # 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"]="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin" + # Now continue looking for the borg binary to use borg_in_path = shutil.which('borg') if borg_in_path: