Minor fix: return error when resource_version method returns empty hash
This commit is contained in:
parent
f8ef7bd0e9
commit
3d9c6ddb75
@ -251,13 +251,22 @@ module Homebrew
|
|||||||
if check_for_resources
|
if check_for_resources
|
||||||
resource_version_info = formula_or_cask.resources.map do |resource|
|
resource_version_info = formula_or_cask.resources.map do |resource|
|
||||||
res_skip_info ||= SkipConditions.skip_information(resource, verbose: verbose)
|
res_skip_info ||= SkipConditions.skip_information(resource, verbose: verbose)
|
||||||
res_skip_info.presence || resource_version(
|
if res_skip_info.present?
|
||||||
|
res_skip_info
|
||||||
|
else
|
||||||
|
res_version_info = resource_version(
|
||||||
resource,
|
resource,
|
||||||
json: json,
|
json: json,
|
||||||
verbose: verbose,
|
verbose: verbose,
|
||||||
debug: debug,
|
debug: debug,
|
||||||
)
|
)
|
||||||
end.compact
|
if res_version_info.empty?
|
||||||
|
status_hash(resource, "error", ["Unable to get versions"], verbose: verbose)
|
||||||
|
else
|
||||||
|
res_version_info
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end.compact_blank
|
||||||
end
|
end
|
||||||
|
|
||||||
skip_info ||= SkipConditions.skip_information(formula_or_cask, full_name: use_full_name, verbose: verbose)
|
skip_info ||= SkipConditions.skip_information(formula_or_cask, full_name: use_full_name, verbose: verbose)
|
||||||
@ -704,6 +713,7 @@ module Homebrew
|
|||||||
next
|
next
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
puts if debug && strategy.blank?
|
||||||
next if strategy.blank?
|
next if strategy.blank?
|
||||||
|
|
||||||
strategy_data = strategy.find_versions(
|
strategy_data = strategy.find_versions(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user