Merge pull request #13436 from Bo98/update-report-fix

cmd/update-report: fix error if new formulae/casks are already installed
This commit is contained in:
Bo Anderson 2022-06-17 02:49:41 +01:00 committed by GitHub
commit aaa733448e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -610,7 +610,7 @@ class ReporterHub
def dump_new_formula_report def dump_new_formula_report
formulae = select_formula_or_cask(:A).sort.map do |name| formulae = select_formula_or_cask(:A).sort.map do |name|
name unless installed?(name) name unless installed?(name)
end end.compact
output_dump_formula_or_cask_report "New Formulae", formulae output_dump_formula_or_cask_report "New Formulae", formulae
end end
@ -618,7 +618,7 @@ class ReporterHub
def dump_new_cask_report def dump_new_cask_report
casks = select_formula_or_cask(:AC).sort.map do |name| casks = select_formula_or_cask(:AC).sort.map do |name|
name.split("/").last unless cask_installed?(name) name.split("/").last unless cask_installed?(name)
end end.compact
output_dump_formula_or_cask_report "New Casks", casks output_dump_formula_or_cask_report "New Casks", casks
end end