Skip to content

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

Merged
m3nu merged 5 commits intoborgbase:masterfrom
greigdp:fix-2100
Dec 12, 2024
Merged

Override $PATH for MacOS to find native homebrew borg binaries (#2100)#2166
m3nu merged 5 commits intoborgbase:masterfrom
greigdp:fix-2100

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
@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