diff --git a/hooks/pre_commit/20-certs_update.rb b/hooks/pre_commit/20-certs_update.rb index 31c08004..9c6b0f5e 100644 --- a/hooks/pre_commit/20-certs_update.rb +++ b/hooks/pre_commit/20-certs_update.rb @@ -14,6 +14,10 @@ key_file = param('certs', 'server_key').value unless app_value(:certs_skip_check) || [cert_file, ca_file, key_file].all? { |v| v.to_s.empty? } - execute!(%(katello-certs-check -c "#{cert_file}" -k "#{key_file}" -b "#{ca_file}")) + stdout_stderr, success = execute_command(%(katello-certs-check -c "#{cert_file}" -k "#{key_file}" -b "#{ca_file}"), false, true) + + unless success + log_and_say(:error, stdout_stderr, true, false) + end end end