Error: Git is unavailable

Due to an extremely rare case (read no sudo), I have a custom git installed in ~/.local/bin rather than in /usr/local/bin
brew installs fine but any functionality fails when git is meant to be called. Is there anything I can do about this?

What message does it fail with?

Try…
HOMEBREW_NO_AUTO_UPDATE=1 brew install git
and report the exact error message if it fails.

It turns out that it was a PATH env issue. I had homebrew in ~/.linuxbrew, but git in ~/.local/bin . This caused the issue in PATH not being read by my rc. It was a seriously extreme condition to need to install in (build essential was also missing). I solved it by installing brew to ~/.local/Homebrew and ln -s 'ing the installation after.