Skip to content

Commit

Permalink
Update Library/Homebrew/os/mac.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab authored Nov 8, 2024
1 parent b61d445 commit b8799ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/os/mac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def self.app_with_bundle_id(*ids)
paths = mdfind(*ids).filter_map do |bundle_path|
Pathname.new(bundle_path) if bundle_path.exclude?("/Backups.backupdb/")
end
return paths.first if paths.any? { |bp| !(bp/"Contents/Info.plist").exist? }
return paths.first unless paths.all? { |bp| (bp/"Contents/Info.plist").exist? }

# Prefer newest one, if we can find it.
paths.max_by { |bundle_path| Homebrew::BundleVersion.from_info_plist(bundle_path/"Contents/Info.plist") }
Expand Down

0 comments on commit b8799ef

Please sign in to comment.