Merge pull request #19095 from Homebrew/bundle_version_plist_readable
cask/cask: ensure plist is readable before reading.
This commit is contained in:
commit
011e9489d7
@ -515,7 +515,7 @@ module Cask
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user