Fixed custom sources table being nerfed by json encoding/decoding process

This commit is contained in:
2025-02-03 12:13:32 +00:00
parent b2911fd5b0
commit 998b0927c9
2 changed files with 6 additions and 3 deletions

View File

@@ -17,7 +17,10 @@ snapshot_create <- function(installOpts = list(Ncpus = parallel::detectCores()))
lastSnapshot <- snapshot_latest()
customSources <- empty_sources()
if (!is.null(lastSnapshot) && "custom" %in% names(lastSnapshot$packages)) {
customSources <- rbind(customSources, lastSnapshot$packages$custom)
customSources <- rbind(
customSources,
do.call(rbind, lapply(lastSnapshot$packages$custom, data.frame))
)
}
packages <- compile_imports(customSources, installOpts)
names(packages) <- c("core", "direct", "indirect", "custom", "install_order")
@@ -40,4 +43,4 @@ snapshot_create <- function(installOpts = list(Ncpus = parallel::detectCores()))
R_version = paste(R.version$major, R.version$minor, sep = "."),
packages = packages
))
}
}