mirror of
https://github.com/borgbase/vorta
synced 2024-12-21 23:33:13 +00:00
Override $PATH for MacOS to find platform-native homebrew borg binaries (#2100)
This commit is contained in:
parent
fcc53e9ba8
commit
1e8d9ecac2
1 changed files with 6 additions and 1 deletions
|
@ -203,7 +203,12 @@ def prepare(cls, profile):
|
|||
@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:
|
||||
|
|
Loading…
Reference in a new issue