From 2d804ae43661ee1ef608b0d0ac1a3fd68ac124f5 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 24 Sep 2016 16:05:18 +0100 Subject: [PATCH] brew.sh: change directory for HOMEBREW_VERSION. This stops `-dirty` showing up whenever you aren't in `HOMEBREW_REPOSITORY`. Fixes #1108. --- Library/Homebrew/brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index d2c8219724..22ebb87edb 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -1,4 +1,4 @@ -HOMEBREW_VERSION="$(GIT_DIR="$HOMEBREW_REPOSITORY/.git" git describe --tags --dirty 2>/dev/null)" +HOMEBREW_VERSION="$(git -C "$HOMEBREW_REPOSITORY" describe --tags --dirty 2>/dev/null)" if [[ -z "$HOMEBREW_VERSION" ]] then HOMEBREW_VERSION=">1.0.0 (no git repository)"