Merge pull request #8172 from Bo98/arg-fixes

Arg fixes
This commit is contained in:
Michka Popoff 2020-08-01 21:24:30 +02:00 committed by GitHub
commit 46101eb0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -135,7 +135,7 @@ class Build
}
with_env(new_env) do
formula.extend(Debrew::Formula) if Homebrew.args.debug?
formula.extend(Debrew::Formula) if args.debug?
formula.update_head_version
@ -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)

View File

@ -49,7 +49,7 @@ module Homebrew
@formula_options = false
self.class.global_options.each do |short, long, desc|
switch short, long, description: desc
switch short, long, description: desc, env: option_to_name(long)
end
instance_eval(&block) if block_given?

View File

@ -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)
@ -25,7 +27,7 @@ begin
formula = args.resolved_formulae.first
formula.extend(Homebrew::Assertions)
formula.extend(Homebrew::FreePort)
formula.extend(Debrew::Formula) if Homebrew.args.debug?
formula.extend(Debrew::Formula) if args.debug?
ENV.extend(Stdenv)
ENV.setup_build_environment(formula: formula)