Skip to content
Snippets Groups Projects
Unverified Commit c8c2e38b authored by Dawid Dziurla's avatar Dawid Dziurla
Browse files

Consistently use HOMEBREW_RUBY_WARNINGS when calling ruby

Adding this in `dev-cmd/ruby.rb` allows us to suppress warnings like:
```
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/language/python.rb:8: warning: Insecure world writable dir /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/scm in PATH, mode 040777
```
parent dd71f388
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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",
......
......@@ -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
......
......@@ -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"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment