From dd6b43d90a112d9527f5b0b16ca07bdd37d56923 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 18 Feb 2022 09:13:37 -0600 Subject: [PATCH] fix #354: set the env var TEXLIVE_PREFER_OWN=1 before calling tlmgr to use TeX Live's own curl instead of curl on PATH --- R/tlmgr.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/tlmgr.R b/R/tlmgr.R index e2cecbf0e..a4152f93c 100644 --- a/R/tlmgr.R +++ b/R/tlmgr.R @@ -46,6 +46,9 @@ tlmgr = function(args = character(), usermode = FALSE, ..., .quiet = FALSE) { ) if (usermode) args = c('--usermode', args) if (!.quiet) message(paste(c('tlmgr', args), collapse = ' ')) + # use TeX Live's own binaries (e.g., curl): https://github.com/yihui/tinytex/issues/354 + vars = xfun::set_envvar(c(TEXLIVE_PREFER_OWN = 1)) + on.exit(xfun::set_envvar(vars), add = TRUE) system2('tlmgr', args, ...) }