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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: checked
Title: Systematically Run R CMD Checks
Version: 0.5.4
Version: 0.5.5
Authors@R:
c(
person(
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# checked 0.5.5

* Add 'install_opts_to_inherit' option which can be used to specify parameters
that install subprocess should inherit from the main process

# checked 0.5.4

* Improve error messaging when using basic_tty
Expand Down
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
2 changes: 0 additions & 2 deletions cran-comments.md

This file was deleted.

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