brew/Library/Homebrew/fetch.rb

22 lines
499 B
Ruby
Raw Normal View History

2020-10-10 14:16:11 +02:00
# typed: true
# frozen_string_literal: true
module Homebrew
2020-08-17 04:53:36 +02:00
# @api private
module Fetch
2020-11-29 22:36:54 +01:00
extend T::Sig
sig { params(f: Formula, args: CLI::Args).returns(T::Boolean) }
def fetch_bottle?(f, args:)
2020-11-29 22:36:54 +01:00
bottle = f.bottle
return true if args.force_bottle? && bottle
return false unless bottle && f.pour_bottle?
return false if args.build_from_source_formulae.include?(f.full_name)
return false unless bottle.compatible_locations?
2018-09-17 02:45:00 +02:00
true
end
end
end