Skip to content

Commit

Permalink
skip compiling knit-tikzDevice.Rnw if pdflatex is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Sep 19, 2024
1 parent d4e0f51 commit 607f98c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testit/test-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ assert('plots are rearrange based on fig.keep & fig.show options', {
})

# should not error when a plot label contains special characters and sanitize=TRUE
if (xfun::loadable('tikzDevice') &&
if (xfun::loadable('tikzDevice') && Sys.which('pdflatex') != '' &&
(!is.na(Sys.getenv('CI', NA)) || Sys.getenv('USER') == 'yihui' || !xfun::is_macos())) {
knit('knit-tikzDevice.Rnw', quiet = TRUE)
unlink(c('*-tikzDictionary', 'figure', 'knit-tikzDevice.tex'), recursive = TRUE)
Expand Down

0 comments on commit 607f98c

Please sign in to comment.