From 24c975f150c0b2c2bc155ccebc56871ea876edb5 Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Tue, 13 Jul 2021 20:02:57 +1000 Subject: [PATCH] Update Library/Homebrew/unversioned_cask_checker.rb Co-authored-by: Maxim Belkin --- Library/Homebrew/unversioned_cask_checker.rb | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Library/Homebrew/unversioned_cask_checker.rb b/Library/Homebrew/unversioned_cask_checker.rb index 879d71fcab..82a16aeec2 100644 --- a/Library/Homebrew/unversioned_cask_checker.rb +++ b/Library/Homebrew/unversioned_cask_checker.rb @@ -83,18 +83,8 @@ module Homebrew installer.extract_primary_container(to: dir) - info_plist_paths = [] - - apps.flat_map do |app| - top_level_info_plists(Pathname.glob(dir/"**"/app.source.basename/"Contents"/"Info.plist")) - .sort - .each { |match| info_plist_paths.push(match) } - end - - qlplugins.flat_map do |qlplugin| - top_level_info_plists(Pathname.glob(dir/"**"/qlplugin.source.basename/"Contents"/"Info.plist")) - .sort - .each { |match| info_plist_paths.push(match) } + info_plist_paths = (apps + qlplugins).flat_map do |app| + top_level_info_plists(Pathname.glob(dir/"**"/app.source.basename/"Contents"/"Info.plist")).sort end info_plist_paths.each(&parse_info_plist)