Merge pull request #18113 from leipert/leipert-patch-2

This commit is contained in:
Carlo Cabrera 2024-08-21 19:58:20 +08:00 committed by GitHub
commit 97286344fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -751,7 +751,12 @@ module Cask
return unless File.exist?(plist_path)
plist = system_command!("plutil", args: ["-convert", "xml1", "-o", "-", plist_path]).plist
plist["CFBundleExecutable"].presence
binary = plist["CFBundleExecutable"].presence
return unless binary
binary_path = "#{path}/Contents/MacOS/#{binary}"
binary_path if File.exist?(binary_path) && File.executable?(binary_path)
end
sig { void }