yihui / tinytex
Showing 1 of 2 files from the diff.
Other files ignored by Codecov
DESCRIPTION has changed.

@@ -82,7 +82,20 @@
Loading
82 82
    }
83 83
  }
84 84
  force(extra_packages)  # evaluate it before installing another version of TinyTeX
85 -
  if (version == 'daily') version = ''
85 +
  if (version == 'daily') {
86 +
    version = ''
87 +
    # test if https://yihui.org is accessible because the daily version is
88 +
    # downloaded from there
89 +
    if (missing(version) && !url_accessible('https://yihui.org')) {
90 +
      warning(
91 +
        "The daily version of TinyTeX does not appear to be accessible. ",
92 +
        "Switching to version = 'latest' instead. If you are sure to install ",
93 +
        "the daily version, call tinytex::install_tinytex(version = 'daily') ",
94 +
        "(which may fail)."
95 +
      )
96 +
      version = 'latest'
97 +
    }
98 +
  }
86 99
  user_dir = install(user_dir, version, add_path, extra_packages)
87 100
88 101
  opts = options(tinytex.tlmgr.path = find_tlmgr(user_dir))
@@ -399,6 +412,15 @@
Loading
399 412
  download_file(url, file)
400 413
}
401 414
415 +
# TODO: use xfun::url_accessible()
416 +
url_accessible = function(url) {
417 +
  tf = tempfile(); on.exit(unlink(tf), add = TRUE)
418 +
  tryCatch(suppressWarnings({
419 +
    xfun::download_file(url, tf, quiet = TRUE)
420 +
    TRUE
421 +
  }), error = function(e) FALSE)
422 +
}
423 +
402 424
#' Copy TinyTeX to another location and use it in another system
403 425
#'
404 426
#' The function \code{copy_tinytex()} copies the existing TinyTeX installation
Files Coverage
R 12.80%
Project Totals (3 files) 12.80%
1
comment: false
2

3
coverage:
4
  status:
5
    project: off
6
    patch: off
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading