utils/ruby.sh: fix HOMEBREW_USE_RUBY_FROM_PATH on non-latest macOS

This commit is contained in:
Bo Anderson 2022-08-03 23:28:44 +01:00
parent ab49c02501
commit ef20a53b4c
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -47,10 +47,10 @@ need_vendored_ruby() {
if [[ -n "${HOMEBREW_FORCE_VENDOR_RUBY}" ]] if [[ -n "${HOMEBREW_FORCE_VENDOR_RUBY}" ]]
then then
return 0 return 0
elif [[ -n "${HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH}" ]] elif [[ -n "${HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH}" && -z "${HOMEBREW_USE_RUBY_FROM_PATH}" ]]
then then
return 1 return 1
elif [[ -z "${HOMEBREW_MACOS}" ]] && test_ruby "${HOMEBREW_RUBY_PATH}" elif [[ -z "${HOMEBREW_MACOS}" || -n "${HOMEBREW_USE_RUBY_FROM_PATH}" ]] && test_ruby "${HOMEBREW_RUBY_PATH}"
then then
return 1 return 1
else else