From 739c2d7bca407a5aef104073b416ad8068c6c26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Thu, 9 Sep 2021 13:27:06 +0200 Subject: [PATCH] Build manual as needed By passing `manual = FALSE` to pkgbuild, it will not add `--no-manual` to the `R CMD build` command line, so `R CMD build` will decide automatically if it needs the PDF manual (if the docs have `\Sexpr{}` expressions) or not. Closes #137. --- R/build.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/R/build.R b/R/build.R index 57b6b33..926e258 100644 --- a/R/build.R +++ b/R/build.R @@ -12,7 +12,12 @@ build_package <- function(path, tmpdir, build_args, libpath, quiet) { if (!quiet) cat_head("R CMD build") with_envvar( c("R_LIBS_USER" = paste(libpath, collapse = .Platform$path.sep)), { - proc <- pkgbuild_process$new(path, tmpdir, args = build_args) + proc <- pkgbuild_process$new( + path, + tmpdir, + args = build_args, + manual = TRUE + ) on.exit(proc$kill(), add = TRUE) callback <- detect_callback() while (proc$is_incomplete_output() ||