7

Running brew --config gives

HOMEBREW_VERSION: >1.0.0 (no git repository)
...

Why is this happening? What can I do to fix it?


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
orome
  • 45,163
  • 57
  • 202
  • 418
  • 1
    I've updated the command in [your previous question.](http://stackoverflow.com/questions/39639146/why-am-i-told-to-cd-when-updating-homebrew/39639761) It seems to fix the problem. – 17xande Sep 22 '16 at 15:46
  • @17xande: That doesn't fix this. – orome Sep 22 '16 at 16:48
  • Apologies, it worked for me. We must have some subtle differences in our brew installations. – 17xande Sep 22 '16 at 18:24
  • @17xande: [A known issue, to be fixed soon.](https://github.com/Homebrew/brew/issues/1091#issuecomment-249033439) – orome Sep 22 '16 at 21:31

1 Answers1

2

As said in the comments, this was a bug of Homebrew itself, described by issue #1091.

The fix was merged by this commit:

- 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)"
Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240