diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 3031765e65..d0ec6dacf7 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -208,7 +208,10 @@ class Build end begin + Homebrew.args = Homebrew::CLI::Parser.new.parse(ARGV.dup.freeze, ignore_invalid_options: true) + args = Homebrew.install_args.parse + error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io) error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) diff --git a/Library/Homebrew/test.rb b/Library/Homebrew/test.rb index 7167aabeb4..2936c20715 100644 --- a/Library/Homebrew/test.rb +++ b/Library/Homebrew/test.rb @@ -16,6 +16,8 @@ require "dev-cmd/test" TEST_TIMEOUT_SECONDS = 5 * 60 begin + Homebrew.args = Homebrew::CLI::Parser.new.parse(ARGV.dup.freeze, ignore_invalid_options: true) + args = Homebrew.test_args.parse error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io) error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)