Running brew --config
gives
HOMEBREW_VERSION: >1.0.0 (no git repository)
...
为什么会发生这种情况?我可以做什么来修复它?
HOMEBREW_VERSION: >1.0.0 (no git repository)
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: bbed7246bc5c5b7acb8c1d427d10b43e090dfd39
Last commit: 4 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: ba0aa68066a89c0654152aba22819736b06987af
Core tap last commit: 77 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.10.0 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.2.4/bin/ruby
Java: 1.8.0_102
macOS: 10.11.6-x86_64
Xcode: 8.0
CLT: 7.3.1.0.1.1461711523
X11: 2.7.9 => /opt/X11
正如评论中所说,这是 Homebrew 本身的一个错误,描述为问题 #1091 https://github.com/Homebrew/brew/issues/1091#issuecomment-249033439.
该修复已合并为这次提交 https://github.com/Homebrew/brew/commit/5af52410abbc2a93fbaf57fc7d8637ed5eaa469f:
- HOMEBREW_VERSION="$(git describe --tags --dirty 2>/dev/null)"
+ HOMEBREW_VERSION="$(GIT_DIR="$HOMEBREW_REPOSITORY/.git" git describe --tags --dirty 2>/dev/null)"
if [[ -z "$HOMEBREW_VERSION" ]]
then
HOMEBREW_VERSION=">1.0.0 (no git repository)"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)