From c556ca6c02ceba6d47adfa6e82892d04bccd1653 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 12 Mar 2024 21:15:44 -0500 Subject: [PATCH] only select https URLs, since some servers may redirect to Location: /ctan/systems/texlive/tlnet/ --- DESCRIPTION | 2 +- R/install.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a7f6cd52f..3ae9c4352 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: tinytex Type: Package Title: Helper Functions to Install and Maintain TeX Live, and Compile LaTeX Documents -Version: 0.49.1 +Version: 0.49.2 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre", "cph"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person(given = "Posit Software, PBC", role = c("cph", "fnd")), diff --git a/R/install.R b/R/install.R index 660ba2d28..333c5c63e 100644 --- a/R/install.R +++ b/R/install.R @@ -206,7 +206,7 @@ auto_repo = function() { curlGetHeaders('https://mirror.ctan.org/systems/texlive/tlnet'), error = function(e) character() ) - x = xfun::grep_sub('^location: ([^[:space:]]+)\\s*$', '\\1', x, ignore.case = TRUE) + x = xfun::grep_sub('^location: (https://[^[:space:]]+)\\s*$', '\\1', x, ignore.case = TRUE) x = tail(x, 1) if (length(x) == 1) x else 'ctan' }