Merge pull request #8407 from dawidd6/ruby-w0

Consistently use HOMEBREW_RUBY_WARNINGS when calling ruby
This commit is contained in:
Dawid Dziurla 2020-08-20 21:38:08 +02:00 committed by GitHub
commit ebafc70bcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 5 deletions

View File

@ -30,6 +30,7 @@ module Homebrew
begin
safe_system RUBY_PATH,
ENV["HOMEBREW_RUBY_WARNINGS"],
"-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
"-rglobal", "-rdev-cmd/irb",
*ruby_sys_args

View File

@ -78,7 +78,7 @@ module Homebrew
begin
exec_args = %W[
#{RUBY_PATH}
-W0
#{ENV["HOMEBREW_RUBY_WARNINGS"]}
-I #{$LOAD_PATH.join(File::PATH_SEPARATOR)}
--
#{HOMEBREW_LIBRARY_PATH}/test.rb

View File

@ -15,7 +15,7 @@ class FormulaInfo
def self.lookup(name)
json = Utils.popen_read(
RUBY_PATH,
"-W0",
ENV["HOMEBREW_RUBY_WARNINGS"],
"-I", $LOAD_PATH.join(File::PATH_SEPARATOR),
HOMEBREW_LIBRARY_PATH/"brew.rb",
"info",

View File

@ -798,7 +798,7 @@ class FormulaInstaller
# the easiest way to do this
args = %W[
nice #{RUBY_PATH}
-W0
#{ENV["HOMEBREW_RUBY_WARNINGS"]}
-I #{$LOAD_PATH.join(File::PATH_SEPARATOR)}
--
#{HOMEBREW_LIBRARY_PATH}/build.rb
@ -966,7 +966,7 @@ class FormulaInstaller
def post_install
args = %W[
nice #{RUBY_PATH}
-W0
#{ENV["HOMEBREW_RUBY_WARNINGS"]}
-I #{$LOAD_PATH.join(File::PATH_SEPARATOR)}
--
#{HOMEBREW_LIBRARY_PATH}/postinstall.rb

View File

@ -84,7 +84,7 @@ RSpec.shared_context "integration test" do
@ruby_args ||= begin
ruby_args = [
"-W0",
ENV["HOMEBREW_RUBY_WARNINGS"],
"-I", $LOAD_PATH.join(File::PATH_SEPARATOR)
]
if ENV["HOMEBREW_TESTS_COVERAGE"]