From f9f3d3d84bf419c0a3bd90526d157d2b328a15ad Mon Sep 17 00:00:00 2001 From: Mohammad Zain Abbas Date: Wed, 10 Aug 2022 22:00:08 +0200 Subject: [PATCH] Minor refractoring --- Library/Homebrew/livecheck/livecheck.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/livecheck/livecheck.rb b/Library/Homebrew/livecheck/livecheck.rb index c34f307eb2..b50da24f14 100644 --- a/Library/Homebrew/livecheck/livecheck.rb +++ b/Library/Homebrew/livecheck/livecheck.rb @@ -284,8 +284,8 @@ module Homebrew # Check current and latest resources (if "--resources" flag is given) # Only check current and latest versions if we have resources to check against - check_for_resources = check_resources && formula_or_cask.is_a?(Formula) && formula_or_cask.resources.present? - if check_for_resources + check_resources = check_resources && formula_or_cask.is_a?(Formula) && formula_or_cask.resources.present? + if check_resources resource_version_info = formula_or_cask.resources.map do |resource| resource_info = resource_version( resource, @@ -339,7 +339,7 @@ module Homebrew info[:meta][:head_only] = true if formula&.head_only? info[:meta].merge!(version_info[:meta]) if version_info.present? && version_info.key?(:meta) - info[:resources] = resource_version_info if check_for_resources + info[:resources] = resource_version_info if check_resources next if newer_only && !info[:version][:outdated] @@ -354,7 +354,7 @@ module Homebrew print_latest_version(info, verbose: verbose, ambiguous_cask: ambiguous_casks.include?(formula_or_cask), resource: false) - if check_for_resources + if check_resources resource_version_info.each do |r_info| print_latest_version( r_info,