R/run.R

Defines functions typr_run

# internal runner for rest of package
typr_run <- function(args = character(0), typst = typr_which_typst()) {
  cmd <- typst[1]
  args <- c(typst[-1], args)

  out <- tryCatch(
    {
      processx::run(
        command = cmd, args = args
      )
    },
    error = function(e) {
      cli::cli_abort('Problem running `typst`.', parent = e)
    }
  )

  out
}

Try the typr package in your browser

Any scripts or data that you put into this service are public.

typr documentation built on June 8, 2025, 10:36 a.m.