Skip to content

Commit

Permalink
Merge pull request #3837 from MikeMcQuaid/system-git-too-old
Browse files Browse the repository at this point in the history
Handle a too old system Git on OS X 10.8 and below
  • Loading branch information
MikeMcQuaid committed Feb 27, 2018
2 parents 650d6db + 72f4d05 commit 8ee2d09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ then
HOMEBREW_FORCE_BREWED_CURL="1"
fi

# The system Git is too old for some GitHub's SSL ciphers on older
# macOS versions.
# https://github.com/blog/2507-weak-cryptographic-standards-removed
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100900" ]]
then
HOMEBREW_SYSTEM_GIT_TOO_OLD="1"
fi

if [[ -z "$HOMEBREW_CACHE" ]]
then
HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ EOS
brew install curl
fi

if ! git --version >/dev/null 2>&1
if [[ -n "$HOMEBREW_SYSTEM_GIT_TOO_OLD" ]] || ! git --version >/dev/null 2>&1
then
# we cannot install brewed git if homebrew/core is unavailable.
[[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && brew install git
Expand Down

0 comments on commit 8ee2d09

Please sign in to comment.