Ignore failed signature check if no signature is present.

This commit is contained in:
Markus Reiter 2022-08-27 03:51:44 +02:00
parent 27093adb09
commit 08642f137f
No known key found for this signature in database
GPG Key ID: 245293B51702655B

View File

@ -581,7 +581,13 @@ module Cask
next unless path.exist?
result = system_command("codesign", args: ["--verify", path], print_stderr: false)
add_warning result.merged_output unless result.success?
next if result.success?
# Only fail if signature is wrong, not when no signature is present at all.
next result.stderr.include?("not signed at all")
add_warning "Signature verification failed: #{result.merged_output}"
end
end
end