upstream-proxy should use Git binary installed with Homebrew
geigerzaehler opened this issue · comments
On macOS the proxy should use the Git binary installed with Homebrew if it is installed. This is necessary because macOS ships with an old version of Git that does not have the necessary features.
Upstream cannot find the Git binary installed by Homebrew because the Homebrew installation location is not in PATH
when Upstream is started as an app and not from a shell.
The Git binary provided by Homebrew should be used by upstream-proxy
when it runs Git (specifically git push
here). The binary should also be considered when checking the Git version during onboarding.
While there are other ways Git can be installed, it is enough to focus on Homebrew because it is the most common installation method. The simplest solution is to use the well known Homebrew paths on M1 and intel (confirm the locations) and try to find Git there.
An alternative approach that we considered is to run SHELL which git
where SHELL
is the value of the SHELL
environment variable or the shell configured in /etc/passwd
or /bin/sh
. However, this does not work because Homebrew installations don’t configure PATH
for non-login shells.
Fixed via:
124e715