More compact way to get livecheckable resources

This commit is contained in:
Mohammad Zain Abbas 2022-07-18 14:49:32 +02:00
parent f8320c89ed
commit 2d231a3478
4 changed files with 7 additions and 5 deletions

2
.gitignore vendored
View File

@ -17,7 +17,7 @@
/Library/Homebrew/test/junit
/Library/Homebrew/test/fs_leak_log
/Library/Homebrew/vendor/portable-ruby
/Library/Taps
#/Library/Taps
/Library/PinnedTaps
/Library/Homebrew/.byebug_history
/Library/Homebrew/sorbet/rbi/hidden-definitions/errors.txt

View File

@ -23,5 +23,7 @@
"editor.codeActionsOnSave": {
"source.fixAll.shellcheck": true,
}
}
},
"git.mergeEditor": true,
"merge-conflict.autoNavigateNextConflict.enabled": true
}

View File

@ -70,8 +70,7 @@ module Homebrew
casks = args.formula? ? [] : Cask::Caskroom.casks
formulae + casks
elsif args.resources?
formula_with_livecheckable_resources = Formula.all.select { |formula| formula.resources.any? { |resource| resource.livecheckable? } }
livecheckable_resources = formula_with_livecheckable_resources.map { |formula| formula.resources }.flatten.filter{ |resource| resource.livecheckable? }
livecheckable_resources = Formula.all.map { |formula| formula.resources }.flatten.filter{ |resource| resource.livecheckable? }
livecheckable_resources
elsif args.all?
formulae = args.cask? ? [] : Formula.all
@ -121,6 +120,6 @@ module Homebrew
verbose: args.verbose?,
}.compact
# Livecheck.run_checks(formulae_and_casks_to_check, **options)
Livecheck.run_checks(formulae_and_casks_to_check, **options)
end
end

@ -0,0 +1 @@
Subproject commit 88b2623dd6ff0dec391029b1f43107438935f4b7