os/mac/keg: print stderr on codesign failure

This commit is contained in:
Bo Anderson 2021-02-10 23:05:35 +00:00
parent 980f928000
commit 5202f712c0

View File

@ -57,13 +57,17 @@ class Keg
# Try signing again
odebug "Codesigning (2nd try) #{file}"
return if quiet_system("codesign", "--sign", "-", "--force",
result = system_command("codesign", args: [
"--sign", "-", "--force",
"--preserve-metadata=entitlements,requirements,flags,runtime",
file)
file
], print_stderr: false)
return if result.success?
# If it fails again, error out
onoe <<~EOS
Failed applying an ad-hoc signature to #{file}
Failed applying an ad-hoc signature to #{file}:
#{result.stderr}
EOS
end
end