Fix style

This commit is contained in:
Rylan Polster 2021-06-18 15:30:14 -04:00
parent 60203afdd5
commit 044da5d5ac
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -361,9 +361,7 @@ module Formulary
end end
def get_formula(*) def get_formula(*)
if !CoreTap.instance.installed? && ENV["HOMEBREW_JSON_CORE"].present? raise CoreTapFormulaUnavailableError, name if !CoreTap.instance.installed? && ENV["HOMEBREW_JSON_CORE"].present?
raise CoreTapFormulaUnavailableError, name
end
raise FormulaUnavailableError, name raise FormulaUnavailableError, name
end end
@ -431,9 +429,7 @@ module Formulary
# @param formula_name the formula name string to map. # @param formula_name the formula name string to map.
# @param local_bottle_path a path pointing to the target bottle archive. # @param local_bottle_path a path pointing to the target bottle archive.
def self.map_formula_name_to_local_bottle_path(formula_name, local_bottle_path) def self.map_formula_name_to_local_bottle_path(formula_name, local_bottle_path)
if ENV["HOMEBREW_JSON_CORE"].blank? raise UsageError, "HOMEBREW_JSON_CORE not set but required for #{__method__}!" if ENV["HOMEBREW_JSON_CORE"].blank?
raise UsageError, "HOMEBREW_JSON_CORE not set but required for #{__method__}!"
end
@formula_name_local_bottle_path_map ||= {} @formula_name_local_bottle_path_map ||= {}
@formula_name_local_bottle_path_map[formula_name] = Pathname(local_bottle_path).realpath @formula_name_local_bottle_path_map[formula_name] = Pathname(local_bottle_path).realpath