mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Universally apply Ruby disable options
This commit is contained in:
parent
31d4da3380
commit
7d7083d0f3
@ -724,7 +724,7 @@ then
|
||||
fi
|
||||
|
||||
# Disable Ruby options we don't need.
|
||||
RUBY_DISABLE_OPTIONS="--disable=gems,rubyopt"
|
||||
export HOMEBREW_RUBY_DISABLE_OPTIONS="--disable=gems,rubyopt"
|
||||
|
||||
if [[ -z "${HOMEBREW_RUBY_WARNINGS}" ]]
|
||||
then
|
||||
@ -839,7 +839,7 @@ else
|
||||
# shellcheck disable=SC2154
|
||||
{
|
||||
auto-update "$@"
|
||||
exec "${HOMEBREW_RUBY_PATH}" "${HOMEBREW_RUBY_WARNINGS}" "${RUBY_DISABLE_OPTIONS}" \
|
||||
exec "${HOMEBREW_RUBY_PATH}" "${HOMEBREW_RUBY_WARNINGS}" "${HOMEBREW_RUBY_DISABLE_OPTIONS}" \
|
||||
"${HOMEBREW_LIBRARY}/Homebrew/brew.rb" "$@"
|
||||
}
|
||||
fi
|
||||
|
@ -11,7 +11,7 @@ homebrew-rubocop() {
|
||||
source "${HOMEBREW_LIBRARY}/Homebrew/utils/ruby.sh"
|
||||
setup-ruby-path
|
||||
|
||||
GEM_VERSION="$("${HOMEBREW_RUBY_PATH}" "${RUBY_DISABLE_OPTIONS}" -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')"
|
||||
GEM_VERSION="$("${HOMEBREW_RUBY_PATH}" "${HOMEBREW_RUBY_DISABLE_OPTIONS}" -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')"
|
||||
GEM_HOME="${HOMEBREW_LIBRARY}/Homebrew/vendor/bundle/ruby/${GEM_VERSION}"
|
||||
BUNDLE_GEMFILE="${HOMEBREW_LIBRARY}/Homebrew/Gemfile"
|
||||
|
||||
|
@ -52,4 +52,5 @@ end.freeze
|
||||
HOMEBREW_RUBY_EXEC_ARGS = [
|
||||
RUBY_PATH,
|
||||
ENV.fetch("HOMEBREW_RUBY_WARNINGS"),
|
||||
ENV.fetch("HOMEBREW_RUBY_DISABLE_OPTIONS"),
|
||||
].freeze
|
||||
|
@ -36,6 +36,7 @@ HOMEBREW_TEMP = (HOMEBREW_PREFIX.parent/"temp").freeze
|
||||
HOMEBREW_RUBY_EXEC_ARGS = [
|
||||
RUBY_PATH,
|
||||
ENV.fetch("HOMEBREW_RUBY_WARNINGS"),
|
||||
ENV.fetch("HOMEBREW_RUBY_DISABLE_OPTIONS"),
|
||||
"-I", HOMEBREW_LIBRARY_PATH/"test/support/lib"
|
||||
].freeze
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user