Skip to content

Commit

Permalink
Merge pull request #18084 from Homebrew/brew_sh_ignore_git_describe_c…
Browse files Browse the repository at this point in the history
…ache
  • Loading branch information
MikeMcQuaid committed Aug 19, 2024
2 parents 3e725e7 + c6ddb9c commit 8191a41
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,13 @@ then
then
HOMEBREW_VERSION="$(cat "${GIT_DESCRIBE_CACHE_FILE}")"
else
rm -rf "${GIT_DESCRIBE_CACHE}"
HOMEBREW_VERSION="$("${HOMEBREW_GIT}" -C "${HOMEBREW_REPOSITORY}" describe --tags --dirty --abbrev=7 2>/dev/null)"
mkdir -p "${GIT_DESCRIBE_CACHE}"
echo "${HOMEBREW_VERSION}" >"${GIT_DESCRIBE_CACHE_FILE}"
# Don't output any permissions errors here.
# The user may not have write permissions to the cache but we don't care
# because it's an optional performance improvement.
rm -rf "${GIT_DESCRIBE_CACHE}" 2>/dev/null
mkdir -p "${GIT_DESCRIBE_CACHE}" 2>/dev/null
echo "${HOMEBREW_VERSION}" >"${GIT_DESCRIBE_CACHE_FILE}" 2>/dev/null
fi
unset GIT_DESCRIBE_CACHE_FILE
else
Expand Down

0 comments on commit 8191a41

Please sign in to comment.