Merge pull request #7434 from GauthamGoli/argv-cleanup-22
ARGV: Deprecate ARGV.build_bottle? and replace with Homebrew.args.build_bottle
This commit is contained in:
commit
bdc7ebf3c7
@ -179,6 +179,12 @@ module Homebrew
|
||||
cmdline_args.include?("--build-from-source") || cmdline_args.include?("-s")
|
||||
end
|
||||
|
||||
def build_bottle
|
||||
return true if args_parsed && build_bottle?
|
||||
|
||||
cmdline_args.include?("--build-bottle")
|
||||
end
|
||||
|
||||
def force_bottle
|
||||
return true if args_parsed && force_bottle?
|
||||
|
||||
@ -221,12 +227,6 @@ module Homebrew
|
||||
cmdline_args.include?("--universal")
|
||||
end
|
||||
|
||||
def build_bottle
|
||||
return true if args_parsed && build_bottle?
|
||||
|
||||
cmdline_args.include?("--build-bottle")
|
||||
end
|
||||
|
||||
def spec(default = :stable)
|
||||
if head
|
||||
:head
|
||||
|
@ -31,10 +31,6 @@ module HomebrewArgvExtension
|
||||
flag?("--debug") || !ENV["HOMEBREW_DEBUG"].nil?
|
||||
end
|
||||
|
||||
def build_bottle?
|
||||
include?("--build-bottle")
|
||||
end
|
||||
|
||||
def bottle_arch
|
||||
arch = value "bottle-arch"
|
||||
arch&.to_sym
|
||||
|
@ -268,7 +268,7 @@ module SharedEnvExtension
|
||||
|
||||
# @private
|
||||
def effective_arch
|
||||
if ARGV.build_bottle? && ARGV.bottle_arch
|
||||
if Homebrew.args.build_bottle && ARGV.bottle_arch
|
||||
ARGV.bottle_arch
|
||||
else
|
||||
Hardware.oldest_cpu
|
||||
|
@ -3,7 +3,7 @@
|
||||
module SharedEnvExtension
|
||||
# @private
|
||||
def effective_arch
|
||||
if ARGV.build_bottle?
|
||||
if Homebrew.args.build_bottle?
|
||||
ARGV.bottle_arch || Hardware.oldest_cpu
|
||||
else
|
||||
:native
|
||||
|
@ -25,7 +25,7 @@ module Homebrew
|
||||
|
||||
fi = FormulaInstaller.new(f)
|
||||
fi.options = options
|
||||
fi.build_bottle = ARGV.build_bottle?
|
||||
fi.build_bottle = Homebrew.args.build_bottle
|
||||
fi.interactive = Homebrew.args.interactive?
|
||||
fi.git = Homebrew.args.git?
|
||||
fi.link_keg ||= keg_was_linked if keg_had_linked_opt
|
||||
|
Loading…
x
Reference in New Issue
Block a user