Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override $PATH for MacOS to find native homebrew borg binaries (#2100) #2166

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

greigdp
Copy link
Contributor

@greigdp greigdp commented Dec 10, 2024

Description

Override the $PATH environment variable on the MacOS (Darwin) platform, so that homebrew-provided native binaries for Borg will be used, rather than falling back to the built-in Borg binary.

Related Issue

#2100

Motivation and Context

For an unknown reason (see linked issue above), the PyInstaller approach to setting the PATH variable does not appear to function any more - Vorta on ARM with a homebrew-installed native borg binary will not find that binary. Debugging shows the PATH variable is set wrongly, and will never find a binary in /opt/homebrew/bin. This patch will change that.

How Has This Been Tested?

  1. Debugging statements added around existing areas of code (see linked issue) to establish the PATH being used
  2. Tested with this change and observed the homebrew based binary was found and shown in About.
  3. Not tested end-to-end yet, as one of the apparent issues in testing was reproducibility against a production release - while I have built it according to the Github actions, this still needs tested against a development build that is created using the normal release method.

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

@m3nu m3nu merged commit c64db22 into borgbase:master Dec 12, 2024
7 checks passed
@ioExpander ioExpander mentioned this pull request Dec 20, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants