Merge pull request #3837 from MikeMcQuaid/system-git-too-old
Handle a too old system Git on OS X 10.8 and below
This commit is contained in:
commit
8ee2d0983c
@ -96,6 +96,14 @@ then
|
|||||||
HOMEBREW_FORCE_BREWED_CURL="1"
|
HOMEBREW_FORCE_BREWED_CURL="1"
|
||||||
fi
|
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" ]]
|
if [[ -z "$HOMEBREW_CACHE" ]]
|
||||||
then
|
then
|
||||||
HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
|
HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
|
||||||
|
|||||||
@ -390,7 +390,7 @@ EOS
|
|||||||
brew install curl
|
brew install curl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! git --version >/dev/null 2>&1
|
if [[ -n "$HOMEBREW_SYSTEM_GIT_TOO_OLD" ]] || ! git --version >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
# we cannot install brewed git if homebrew/core is unavailable.
|
# we cannot install brewed git if homebrew/core is unavailable.
|
||||||
[[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && brew install git
|
[[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && brew install git
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user