2019-04-19 15:38:03 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-06-05 23:19:18 -04:00
|
|
|
module Homebrew
|
2020-08-17 04:53:36 +02:00
|
|
|
# @api private
|
2018-06-05 23:19:18 -04:00
|
|
|
module Fetch
|
2020-07-26 22:00:38 +02:00
|
|
|
def fetch_bottle?(f, args:)
|
2020-07-23 02:43:22 +02:00
|
|
|
return true if args.force_bottle? && f.bottle
|
2018-06-05 23:19:18 -04:00
|
|
|
return false unless f.bottle && f.pour_bottle?
|
2020-07-28 14:08:40 +02:00
|
|
|
return false if args.build_from_source_formulae.include?(f.full_name)
|
2018-06-05 23:19:18 -04:00
|
|
|
return false unless f.bottle.compatible_cellar?
|
2018-09-17 02:45:00 +02:00
|
|
|
|
2018-06-05 23:19:18 -04:00
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|