mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Require Ruby 2.6.8
This commit is contained in:
parent
404850600f
commit
d0f6f7d52b
@ -458,9 +458,7 @@ then
|
||||
|
||||
# Set a variable when the macOS system Ruby is new enough to avoid spawning
|
||||
# a Ruby process unnecessarily.
|
||||
# On Catalina the system Ruby is technically new enough but don't allow it:
|
||||
# https://github.com/Homebrew/brew/issues/9410
|
||||
if [[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -lt "101600" ]]
|
||||
if [[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -lt "120000" ]]
|
||||
then
|
||||
unset HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH
|
||||
else
|
||||
|
@ -201,19 +201,12 @@ module Homebrew
|
||||
end
|
||||
|
||||
def check_ruby_version
|
||||
# TODO: require 2.6.8 for everyone once enough have updated to Monterey
|
||||
required_version = if MacOS.version >= :monterey ||
|
||||
ENV["HOMEBREW_RUBY_PATH"].to_s.include?("/vendor/portable-ruby/")
|
||||
"2.6.8"
|
||||
else
|
||||
HOMEBREW_REQUIRED_RUBY_VERSION
|
||||
end
|
||||
return if RUBY_VERSION == required_version
|
||||
return if RUBY_VERSION == HOMEBREW_REQUIRED_RUBY_VERSION
|
||||
return if Homebrew::EnvConfig.developer? && OS::Mac.version.prerelease?
|
||||
|
||||
<<~EOS
|
||||
Ruby version #{RUBY_VERSION} is unsupported on macOS #{MacOS.version}. Homebrew
|
||||
is developed and tested on Ruby #{required_version}, and may not work correctly
|
||||
is developed and tested on Ruby #{HOMEBREW_REQUIRED_RUBY_VERSION}, and may not work correctly
|
||||
on other Rubies. Patches are accepted as long as they don't cause breakage
|
||||
on supported Rubies.
|
||||
EOS
|
||||
|
@ -1,4 +1,4 @@
|
||||
export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.3
|
||||
export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.8
|
||||
|
||||
# HOMEBREW_LIBRARY is from the user environment
|
||||
# shellcheck disable=SC2154
|
||||
|
Loading…
x
Reference in New Issue
Block a user