fix: account for non-pkg items in counting unique files
This commit is contained in:
parent
6896a844cf
commit
db3b0531af
1 changed files with 3 additions and 3 deletions
|
|
@ -93,9 +93,9 @@ upload_package_index <- function(
|
|||
cli::cli_alert("{.fun upload_package_index}: Started listing remote packages")
|
||||
pkgs <- s3fs::s3_dir_ls(remote_bin_dir)
|
||||
cli::cli_alert_success("{.fun upload_package_index}: Finished listing remote packages")
|
||||
# We remove 4 from the count as we don't want to count the PACKAGES* files
|
||||
pkg_count <- length(pkgs) - 4
|
||||
unique_pkgs <- length(unique(sapply(strsplit(basename(pkgs), "_"), function(x) x[1])))
|
||||
# We remove 4 from the count as we don't want to count the PACKAGES* files + Archive/ dir
|
||||
pkg_count <- length(pkgs) - 5
|
||||
unique_pkgs <- length(unique(sapply(strsplit(basename(pkgs), "_"), function(x) x[1]))) - 5
|
||||
|
||||
t1 <- Sys.time()
|
||||
cranlike::update_PACKAGES(sprintf("s3://%s", remote_bin_dir))
|
||||
|
|
|
|||
Loading…
Reference in a new issue