cask/cask: ensure plist is readable before reading.
If we don't have permissions to read it, this will raise an exception even although this whole call chain is very tolerant of nil values.
This commit is contained in:
parent
4c9de7d31c
commit
93a9776e34
@ -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