aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/brew.sh
diff options
context:
space:
mode:
authorMike McQuaid2016-09-22 21:46:11 +0100
committerMike McQuaid2016-09-22 21:46:11 +0100
commit5af52410abbc2a93fbaf57fc7d8637ed5eaa469f (patch)
treefa403739cc40bd13e5a88bfb5e48077dba5bc14f /Library/Homebrew/brew.sh
parentbbed7246bc5c5b7acb8c1d427d10b43e090dfd39 (diff)
downloadbrew-5af52410abbc2a93fbaf57fc7d8637ed5eaa469f.tar.bz2
brew.sh: fix brew --version outside HOMEBREW_REPOSITORY.
Diffstat (limited to 'Library/Homebrew/brew.sh')
-rw-r--r--Library/Homebrew/brew.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh
index e4c1e700a..d2c821972 100644
--- a/Library/Homebrew/brew.sh
+++ b/Library/Homebrew/brew.sh
@@ -1,4 +1,4 @@
-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)"