Skip to content

Commit

Permalink
use a dedicated env var to decide whether to check DESCRIPTION: #1864…
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Jun 2, 2021
1 parent 89a1f6c commit 93720d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: knitr
Type: Package
Title: A General-Purpose Package for Dynamic Report Generation in R
Version: 1.33.4
Version: 1.33.5
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("Abhraneel", "Sarma", role = "ctb"),
Expand Down
6 changes: 4 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ test_desc_dep = function(pkg, dir = '.') {

# TODO: remove this hack in the future when no CRAN/BioC packages have the issue
test_vig_dep = function(pkg) {
if (skip_cran_bioc() || test_desc_dep(pkg, '..')) return()
if (no_test_vig_dep() || test_desc_dep(pkg, '..')) return()
p = read.dcf(file.path('..', 'DESCRIPTION'), fields = 'Package')[1, 1]
stop2(
"The '", pkg, "' package should be installed and declared as a dependency of the '", p,
Expand All @@ -1072,4 +1072,6 @@ test_vig_dep = function(pkg) {
)
}

skip_cran_bioc = function() is_R_CMD_check() || Sys.getenv('BBS_HOME') != ''
no_test_vig_dep = function() {
is_R_CMD_check() || tolower(Sys.getenv('KNITR_NO_TEST_VIGNETTE_DEP')) == 'true'
}

0 comments on commit 93720d3

Please sign in to comment.