Skip to content

Commit

Permalink
cask/audit.rb: update signing checks for app, binary, and pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
krehel committed Apr 4, 2024
1 parent fcc190b commit 118e066
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,16 @@ def audit_signing

next unless path.exist?

result = system_command("spctl", args: ["--assess", "--type", "install", path], print_stderr: false)
result = case artifact
when Artifact::Pkg
system_command("spctl", args: ["--assess", "--type", "install", path], print_stderr: false)
when Artifact::App
system_command("spctl", args: ["--assess", "--type", "execute", path], print_stderr: false)
when Artifact::Binary
system_command("codesign", args: ["-vvvv", "-R=notarized", "--check-notarization", path], print_stderr: false)
else
add_error "Unknown artifact type: #{artifact.class}", location: cask.url.location
end

next if result.success?

Expand Down

0 comments on commit 118e066

Please sign in to comment.