diff --git a/R/build_binaries.R b/R/build_binaries.R index 7aaa514..48857a8 100644 --- a/R/build_binaries.R +++ b/R/build_binaries.R @@ -97,7 +97,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL, # if for some reason an underlying error didnt' get caught in the tryCatch calls, we check again here for the existence of the binary file on disk and mark the build as failed if it is not found tarball_name <- sprintf("%s_%s.tar.gz", x, y) - if (file.exists(sprintf("%s/%s", local_bin_path, tarball_name))) { + if (fs::file_exists(sprintf("%s/%s", local_bin_path, tarball_name))) { store_build_metadata(x, y, platform, error_occurred = FALSE, force = force) cli::cli_alert_success("Successfully built package {.pkg {x}} with tag {.field {y}}.") } else { diff --git a/R/metadata-build.R b/R/metadata-build.R index 29ce94c..748df73 100644 --- a/R/metadata-build.R +++ b/R/metadata-build.R @@ -19,8 +19,8 @@ store_build_metadata <- function( } else if (nrow(existing_entries) >= 1 && force) { cli::cli_alert_info("{.fun store_build_metadata}: Force overwriting build metadata for {.pkg {package_name}} {.field {tag}} because {.code force = TRUE} was set.") - DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3, platform = $4 WHERE package_name = $5 and tag = $6", - params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, platform, package_name, tag) + DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3, WHERE package_name = $5 and tag = $6 and platform = $7", + params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, package_name, tag, platform) ) } else if (nrow(existing_entries) == 0) { cli::cli_alert("{.fun store_build_metadata}: Storing build metadata for {.pkg {package_name}} {.field {tag}}.")