ARGV: Deprecate ARGV.force_bottle?

This commit is contained in:
Gautham G 2020-04-05 17:39:30 +05:30 committed by Mike McQuaid
parent a5b6c5f262
commit 676ebf7419
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
5 changed files with 9 additions and 7 deletions

View File

@ -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 force_bottle
return true if args_parsed && force_bottle?
cmdline_args.include?("--force-bottle")
end
private private
def downcased_unique_named def downcased_unique_named

View File

@ -40,10 +40,6 @@ module HomebrewArgvExtension
arch&.to_sym arch&.to_sym
end end
def force_bottle?
include?("--force-bottle")
end
def cc def cc
value "cc" value "cc"
end end

View File

@ -5,7 +5,7 @@ module Homebrew
module_function module_function
def fetch_bottle?(f) def fetch_bottle?(f)
return true if ARGV.force_bottle? && f.bottle return true if Homebrew.args.force_bottle && f.bottle
return false unless f.bottle && f.pour_bottle? return false unless f.bottle && f.pour_bottle?
return false if Homebrew.args.build_formula_from_source?(f) return false if Homebrew.args.build_formula_from_source?(f)
return false unless f.bottle.compatible_cellar? return false unless f.bottle.compatible_cellar?

View File

@ -51,7 +51,7 @@ class FormulaInstaller
@only_deps = false @only_deps = false
@build_from_source = Homebrew.args.build_from_source @build_from_source = Homebrew.args.build_from_source
@build_bottle = false @build_bottle = false
@force_bottle = ARGV.force_bottle? @force_bottle = Homebrew.args.force_bottle
@include_test = ARGV.include?("--include-test") @include_test = ARGV.include?("--include-test")
@interactive = false @interactive = false
@git = false @git = false

View File

@ -95,7 +95,7 @@ class SoftwareSpec
def bottled? def bottled?
bottle_specification.tag?(Utils::Bottles.tag) && \ bottle_specification.tag?(Utils::Bottles.tag) && \
(bottle_specification.compatible_cellar? || ARGV.force_bottle?) (bottle_specification.compatible_cellar? || Homebrew.args.force_bottle)
end end
def bottle(disable_type = nil, disable_reason = nil, &block) def bottle(disable_type = nil, disable_reason = nil, &block)