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
|
# Set a variable when the macOS system Ruby is new enough to avoid spawning
|
||||||
# a Ruby process unnecessarily.
|
# a Ruby process unnecessarily.
|
||||||
# On Catalina the system Ruby is technically new enough but don't allow it:
|
if [[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -lt "120000" ]]
|
||||||
# https://github.com/Homebrew/brew/issues/9410
|
|
||||||
if [[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -lt "101600" ]]
|
|
||||||
then
|
then
|
||||||
unset HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH
|
unset HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH
|
||||||
else
|
else
|
||||||
|
@ -201,19 +201,12 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_ruby_version
|
def check_ruby_version
|
||||||
# TODO: require 2.6.8 for everyone once enough have updated to Monterey
|
return if RUBY_VERSION == HOMEBREW_REQUIRED_RUBY_VERSION
|
||||||
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 Homebrew::EnvConfig.developer? && OS::Mac.version.prerelease?
|
return if Homebrew::EnvConfig.developer? && OS::Mac.version.prerelease?
|
||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
Ruby version #{RUBY_VERSION} is unsupported on macOS #{MacOS.version}. Homebrew
|
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 other Rubies. Patches are accepted as long as they don't cause breakage
|
||||||
on supported Rubies.
|
on supported Rubies.
|
||||||
EOS
|
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
|
# HOMEBREW_LIBRARY is from the user environment
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
|
Loading…
x
Reference in New Issue
Block a user