You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Does anybody know how to set the PATH environment variable that Sourcetree on macOS uses when invoking git?
Background: For years I have been using a tool called git-remote-dropbox to store git repos for personal projects within my Dropbox account. These repos are accessed using a dropbox:// URI and git automatically calls the git-remote-dropbox Python script when encountering a remote with such a URI. It works beautifully...but only if git can find the git-remote-dropbox script.
In the past, opening Sourcetree from the command line with the stree command would cause it to inherit the PATH from the shell, and it would then be able to find the script.
An OS update forced some reworking of the Python installation and I had to reinstall the script to a different path. I updated PATH in my shell configuration, and the system git can find the script in the new location when invoked from the shell. But Sourcetree does not seem to be inheriting the new PATH, and git invocations from within Sourcetree can't find the script in the new location. This is true for both embedded git and system git.
Sourcetree must be getting its PATH from somewhere, but I can't figure out where, or how to set it. Anybody know?
Workaround: Further experimentation revealed that /usr/local/bin is on the path seen by git when invoked from Sourcetree, so I got things running by adding a symlink to git-remote-dropbox in /usr/local/bin. But I'd still like to know if there's a way to configure Sourcetree's PATH variable for git invocation.