better logging

This commit is contained in:
Patrick Schratz 2024-07-28 10:40:59 +02:00
commit f847cc6b66
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -67,6 +67,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
{
install_package_system_dependencies(package_name, tag, platform, local_clone_dir)
},
# NB: here we need to use conditionMessage() to extract the actual error - as opposed to using $stderr for errors within the tryCatch used in the future* calls
error = function(e) {
message(sprintf("Error in installing dependencies for package %s with tag %s: %s", package_name[1], tag[1], e))
store_build_metadata(package_name[1], tag[1], platform, error_occurred = TRUE, force = TRUE, error = conditionMessage(e))