Skip to content

Commit

Permalink
make package_record delegate to packageDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
mslynch committed Aug 25, 2023
1 parent 448284c commit 8f1ad14
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions R/bundlePackage.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,5 @@ availablePackages <- function(repos) {
}

package_record <- function(name, lib_dir = NULL) {
path <- system.file("DESCRIPTION", package = name, lib.loc = lib_dir)
record <- as.list(as.data.frame(read.dcf(path)))
encoding <- record$Encoding
if (!is.null(encoding) && toupper(encoding) != "UTF-8") {
record <- lapply(record, function(item) {
iconv(item, from = encoding, to = "UTF-8")
})
}
record
packageDescription(name, lib.loc = lib_dir)
}

0 comments on commit 8f1ad14

Please sign in to comment.