mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
doctor: use minimum Git version set in brew.sh
This commit is contained in:
parent
7aa9956934
commit
0362e66a26
@ -105,7 +105,8 @@ then
|
||||
HOMEBREW_FORCE_BREWED_CURL="1"
|
||||
fi
|
||||
|
||||
# The system Git is too old for some Homebrew functionality we rely on.
|
||||
# The system Git on macOS versions before Sierra is too old for some Homebrew functionality we rely on.
|
||||
HOMEBREW_MINIMUM_GIT_VERSION="2.14.3"
|
||||
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "101200" ]]
|
||||
then
|
||||
HOMEBREW_FORCE_BREWED_GIT="1"
|
||||
@ -198,6 +199,7 @@ export HOMEBREW_SYSTEM
|
||||
export HOMEBREW_CURL
|
||||
export HOMEBREW_SYSTEM_CURL_TOO_OLD
|
||||
export HOMEBREW_GIT
|
||||
export HOMEBREW_MINIMUM_GIT_VERSION
|
||||
export HOMEBREW_PROCESSOR
|
||||
export HOMEBREW_PRODUCT
|
||||
export HOMEBREW_OS_VERSION
|
||||
|
@ -489,8 +489,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
def check_git_version
|
||||
# System Git version on macOS Sierra.
|
||||
minimum_version = "2.14.3".freeze
|
||||
minimum_version = ENV["HOMEBREW_MINIMUM_GIT_VERSION"].freeze
|
||||
return unless Utils.git_available?
|
||||
return if Version.create(Utils.git_version) >= Version.create(minimum_version)
|
||||
|
||||
|
@ -141,6 +141,7 @@ class SystemConfig
|
||||
HOMEBREW_LIBRARY
|
||||
HOMEBREW_MACOS_VERSION
|
||||
HOMEBREW_MACOS_VERSION_NUMERIC
|
||||
HOMEBREW_MINIMUM_GIT_VERSION
|
||||
HOMEBREW_RUBY_PATH
|
||||
HOMEBREW_SYSTEM
|
||||
HOMEBREW_SYSTEM_TEMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user