Skip to content

Commit

Permalink
Merge pull request #19095 from Homebrew/bundle_version_plist_readable
Browse files Browse the repository at this point in the history
cask/cask: ensure plist is readable before reading.
  • Loading branch information
MikeMcQuaid authored Jan 14, 2025
2 parents 9eaa048 + 93a9776 commit 011e948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def artifacts_list(compact: false, uninstall_only: false)
sig { returns(T.nilable(Homebrew::BundleVersion)) }
def bundle_version
@bundle_version ||= if (bundle = artifacts.find { |a| a.is_a?(Artifact::App) }&.target) &&
(plist = Pathname("#{bundle}/Contents/Info.plist")) && plist.exist?
(plist = Pathname("#{bundle}/Contents/Info.plist")) && plist.exist? && plist.readable?
Homebrew::BundleVersion.from_info_plist(plist)
end
end
Expand Down

0 comments on commit 011e948

Please sign in to comment.