Skip to content

Commit

Permalink
Fixes #34888: Display katello-certs-check output only if error
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed May 10, 2022
1 parent f5b9904 commit 688d0a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hooks/pre_commit/20-certs_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 688d0a7

Please sign in to comment.