From ebf52091eb372171f529aff3324b6eb3af59c9c5 Mon Sep 17 00:00:00 2001 From: Mohammad Zain Abbas Date: Sun, 24 Jul 2022 14:14:10 +0200 Subject: [PATCH] Check only formulas with resources --- Library/Homebrew/dev-cmd/livecheck.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/dev-cmd/livecheck.rb b/Library/Homebrew/dev-cmd/livecheck.rb index 41e8b6e8ff..6c55f7e8d3 100644 --- a/Library/Homebrew/dev-cmd/livecheck.rb +++ b/Library/Homebrew/dev-cmd/livecheck.rb @@ -70,8 +70,8 @@ module Homebrew casks = args.formula? ? [] : Cask::Caskroom.casks formulae + casks elsif args.resources? - livecheckable_resources = Formula.all.map { |formula| formula.resources }.flatten.filter{ |resource| resource.livecheckable? } - livecheckable_resources + formula_with_resources = Formula.all.select { |formula| formula.resources.any? } + formula_with_resources elsif args.all? formulae = args.cask? ? [] : Formula.all casks = args.formula? ? [] : Cask::Cask.all @@ -99,10 +99,10 @@ module Homebrew raise UsageError, "A watchlist file is required when no arguments are given." end - p package_and_resource_to_check.class - p package_and_resource_to_check.length - p package_and_resource_to_check[0].class - p package_and_resource_to_check.map { |d| d.name } + # p package_and_resource_to_check.class + # p package_and_resource_to_check.length + # p package_and_resource_to_check[0].class + # p package_and_resource_to_check.map { |d| d.name } package_and_resource_to_check = package_and_resource_to_check.sort_by do |package_or_resource| package_or_resource.respond_to?(:token) ? package_or_resource.token : package_or_resource.name