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