utils/ruby.sh: don't _require_ 3.1 in HOMEBREW_RUBY3 mode
This commit is contained in:
parent
559336c771
commit
7a9f3eb800
@ -10,16 +10,24 @@ test_ruby() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
supported_ruby_versions=()
|
||||||
if [[ -n "${HOMEBREW_RUBY3}" && -z "${HOMEBREW_USE_RUBY_FROM_PATH}" ]]
|
if [[ -n "${HOMEBREW_RUBY3}" && -z "${HOMEBREW_USE_RUBY_FROM_PATH}" ]]
|
||||||
then
|
then
|
||||||
required_ruby_version="3.1.0"
|
supported_ruby_versions+=("3.1.0")
|
||||||
else
|
|
||||||
required_ruby_version="${HOMEBREW_REQUIRED_RUBY_VERSION}"
|
|
||||||
fi
|
fi
|
||||||
|
supported_ruby_versions+=("${HOMEBREW_REQUIRED_RUBY_VERSION}")
|
||||||
|
|
||||||
"$1" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt \
|
for ruby_version in "${supported_ruby_versions[@]}"
|
||||||
"${HOMEBREW_LIBRARY}/Homebrew/utils/ruby_check_version_script.rb" \
|
do
|
||||||
"${required_ruby_version}" 2>/dev/null
|
if "$1" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt \
|
||||||
|
"${HOMEBREW_LIBRARY}/Homebrew/utils/ruby_check_version_script.rb" \
|
||||||
|
"${ruby_version}" 2>/dev/null
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
can_use_ruby_from_path() {
|
can_use_ruby_from_path() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user