Cask: fix signing audit using unexpected pkg method

This commit is contained in:
Sean Molenaar 2022-08-17 15:49:04 +02:00
parent 3f3c2f5390
commit b13f6c7c40
No known key found for this signature in database
GPG Key ID: 6BF5D8DF0D34FAAE

View File

@ -572,10 +572,15 @@ module Cask
tmpdir = Pathname(tmpdir) tmpdir = Pathname(tmpdir)
primary_container.extract_nestedly(to: tmpdir, basename: downloaded_path.basename, verbose: false) primary_container.extract_nestedly(to: tmpdir, basename: downloaded_path.basename, verbose: false)
artifacts.each do |artifact| artifacts.each do |artifact|
result = system_command("codesign", args: [ path = case artifact
"--verify", when Artifact::Moved
tmpdir/artifact.source.basename, tmpdir/artifact.source.basename
], print_stderr: false) when Artifact::Pkg
artifact.path
end
next unless path.exist?
result = system_command("codesign", args: ["--verify", path], print_stderr: false)
add_warning result.merged_output unless result.success? add_warning result.merged_output unless result.success?
end end
end end