Merge pull request #9502 from reitermarkus/bump-unversioned-casks

Ignore `Info.plist` for nested apps.
This commit is contained in:
Markus Reiter 2020-12-10 20:15:24 +01:00 committed by GitHub
commit fc921bb640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,10 @@ module Homebrew
end
info_plist_paths = apps.flat_map do |app|
Pathname.glob(dir/"**"/app.source.basename/"Contents"/"Info.plist")
Pathname.glob(dir/"**"/app.source.basename/"Contents"/"Info.plist").reject do |info_plist_path|
# Ignore nested apps.
info_plist_path.parent.parent.parent.ascend.any? { |p| p.extname == ".app" }
end.sort
end
info_plist_paths.each do |info_plist_path|
@ -114,7 +117,7 @@ module Homebrew
end
pkg_paths = pkgs.flat_map do |pkg|
Pathname.glob(dir/"**"/pkg.path.basename)
Pathname.glob(dir/"**"/pkg.path.basename).sort
end
pkg_paths.each do |pkg_path|