Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@ install_process <- R6::R6Class(
...,
lib = .libPaths()[[1]],
libpaths = .libPaths(),
available_packages_filters = getOption("available_packages_filters"),
log = NULL,
env = callr::rcmd_safe_env()
env = options::opt("install_envvars")
) {
if (!dir.exists(lib)) dir.create(lib, recursive = TRUE)
private$package <- pkgs
self$log <- log
private$callr_r_bg(
function(..., available_packages_filters) {
options(
timeout = 600,
available_packages_filters = available_packages_filters
)
function(..., opts_to_inherit) {
do.call(options, opts_to_inherit)
invisible(capture.output(withCallingHandlers(
utils::install.packages(..., quiet = FALSE, verbose = TRUE),
warning = function(w) {
Expand All @@ -35,7 +31,9 @@ install_process <- R6::R6Class(
private$package,
...,
lib = lib,
available_packages_filters = available_packages_filters
opts_to_inherit = do.call(
options, options::opt("install_opts_to_inherit")
)
),
libpath = libpaths,
stdout = self$log,
Expand Down
11 changes: 10 additions & 1 deletion R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ options::define_options(

"value used as `user_profile` parameter passed to the `callr::r_bg()`
function used to install packages",
install_user_profile = "project"
install_user_profile = "project",

"`list` of characters which specifies names of the R session options that
should be inherited by the install subprocesses, from the main process ",
install_opts_to_inherit = list(
"timeout",
"available_packages_filters",
"HTTPUserAgent",
"pkgType"
)
)

#' @eval options::as_roxygen_docs()
Expand Down
5 changes: 3 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Few minor updates to to exported functions and CRAN results failure address.
Reduced the runtime of tests on CRAN
Updates to the logic
Mitigate the risk of an infinite loop
Address callr changes
8 changes: 8 additions & 0 deletions man/options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/options_params.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading