Closed xu-cheng closed 6 years ago
Thanks for the bug report! Here's a quick fix PR https://github.com/Linuxbrew/brew/pull/821 which removes --local
. The better solution is as you say is to use shims/scm/git
.
Thanks again for the fixing.
No worries. Thanks for the bug report!
Please fill out the issue checklist below and provide all the requested information.
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Linuxbrew/homebrew-core: https://github.com/Linuxbrew/homebrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?If the system git is too old,
brew update
will report the errors similar to the below.This will only happen if the system git is too old to support
--local
flag. Noted that due to the Homebrew path filtering,brew update-report
cannot find the brew git.To workaround the issue, one can set
HOMEBREW_NO_ENV_FILTERING=1
. As for the fix, I would suggest:safe_system
tosystem
, for the following codes: https://github.com/Linuxbrew/brew/blob/c918fcc1d954078f54a3475dcacc99377ec9b745/Library/Homebrew/cmd/update-report.rb#L49-L50 https://github.com/Linuxbrew/brew/blob/c918fcc1d954078f54a3475dcacc99377ec9b745/Library/Homebrew/cmd/update-report.rb#L62brew update-report
or the whole homebrew code in general should use the git shim, which is specifically designed to search the proper git executable.My
brew config
: