Thanks to visit codestin.com
Credit goes to github.com

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
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ importFrom(prettyunits,pretty_sec)
importFrom(rprojroot,find_package_root_file)
importFrom(utils,head)
importFrom(utils,tail)
importFrom(withr,local_path)
importFrom(withr,with_dir)
importFrom(withr,with_envvar)
importFrom(xopen,xopen)
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# dev

* RStudio's Pandoc is now on the path during `rcmdcheck()`
and `rcmdcheck_process` (#109, #132, @dpprdan).

# 1.3.3

* `cran_check_results()` has now a `quiet` argument, and the download
Expand Down
6 changes: 6 additions & 0 deletions R/background.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ rcc_init <- function(self, private, super, path, args, build_args,
cleanup <- FALSE
}

# Add pandoc to the PATH for R CMD build.
# The updated PATH is also inherited in the subprocess below.
if (!nzchar(Sys.which("pandoc")) && nzchar(Sys.getenv("RSTUDIO_PANDOC"))) {
local_path(Sys.getenv("RSTUDIO_PANDOC"))
}

targz <- build_package(path, check_dir, build_args = build_args,
libpath = libpath, quiet = TRUE)

Expand Down
4 changes: 4 additions & 0 deletions R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
#' fractional. Defaults to 1/3 of a second. The corresponding option is
#' `rcmdcheck.timestamp_limit`.
#'
#' * `RSTUDIO_PANDOC`: if set, rcmdcheck adds this environment variable
#' to the PATH if pandoc is not on the PATH already. It is usually set
#' in RStudio.
#'
#' # Options
#'
#' * `rcmdcheck.num_colors`: the number of ANSI colors to use in the output.
Expand Down
7 changes: 6 additions & 1 deletion R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ NULL
#'
#' @export
#' @importFrom rprojroot find_package_root_file
#' @importFrom withr with_dir
#' @importFrom withr local_path with_dir
#' @importFrom callr rcmd_safe
#' @importFrom desc desc

Expand All @@ -75,6 +75,11 @@ rcmdcheck <- function(path = ".", quiet = FALSE, args = character(),
cleanup <- FALSE
}

# Add pandoc to the PATH, for R CMD build and R CMD check
if (!nzchar(Sys.which("pandoc")) && nzchar(Sys.getenv("RSTUDIO_PANDOC"))) {
local_path(Sys.getenv("RSTUDIO_PANDOC"))
}

targz <- build_package(path, check_dir, build_args = build_args,
libpath = libpath, quiet = quiet)

Expand Down
3 changes: 3 additions & 0 deletions man/rcmdcheck-config.Rd

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