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

@@ -1,7 +1,7 @@
Package: Rpacman Package: Rpacman
Type: Package Type: Package
Title: Very simple package manager for R Title: Very simple package manager for R
Version: 1.0.15 Version: 1.0.16
Date: 2025-01-30 Date: 2025-01-30
Authors@R: person("Craig", "Williams", email = "craig@avsdev.uk", role = c("aut", "cre")) Authors@R: person("Craig", "Williams", email = "craig@avsdev.uk", role = c("aut", "cre"))
URL: https://avsdev.uk/R/Rpacman URL: https://avsdev.uk/R/Rpacman

View File

@@ -17,7 +17,10 @@ snapshot_create <- function(installOpts = list(Ncpus = parallel::detectCores()))
lastSnapshot <- snapshot_latest() lastSnapshot <- snapshot_latest()
customSources <- empty_sources() customSources <- empty_sources()
if (!is.null(lastSnapshot) && "custom" %in% names(lastSnapshot$packages)) { 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) packages <- compile_imports(customSources, installOpts)
names(packages) <- c("core", "direct", "indirect", "custom", "install_order") names(packages) <- c("core", "direct", "indirect", "custom", "install_order")