From ab4ca53e64de1175f5c7edf50ccca023613ac362 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Wed, 23 Jun 2021 12:56:44 -0500 Subject: [PATCH] signal an error when buiding rmarkdown vignettes but Pandoc is not available, unless the vignette is build during R CMD check (in which case a message is emitted instead) --- R/utils-vignettes.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils-vignettes.R b/R/utils-vignettes.R index 25d37614a5..4317fc7842 100644 --- a/R/utils-vignettes.R +++ b/R/utils-vignettes.R @@ -101,7 +101,7 @@ register_vignette_engines = function(pkg) { if (pandoc_available()) { vweave_rmarkdown(...) } else { - (if (is.na(Sys.getenv('CI', NA))) message else stop2)( + (if (is_R_CMD_check()) message else stop2)( 'Pandoc is required to build R Markdown vignettes but not available. ', 'Please make sure it is installed.' )