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)