Skip to content

Commit

Permalink
normalize quarto_path()
Browse files Browse the repository at this point in the history
which resolves symlink
  • Loading branch information
cderv committed Aug 28, 2024
1 parent f5befb1 commit 3286df2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: quarto
Title: R Interface to 'Quarto' Markdown Publishing System
Version: 1.4.4.9001
Version: 1.4.4.9002
Authors@R: c(
person("JJ", "Allaire", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-0174-9868")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- Add `quarto.quiet` options to allow more verbose error message when `quarto_*` function are used inside other package.
For example, inside **pkgdown** for building Quarto vignettes. **pkgdown** sets `quiet = TRUE` internally for its call to `quarto_render()`,
and setting `options(quarto.quiet = TRUE)` allows to overwrite this.

- `quarto_path()` now returns a normalized path with potential symlink resolved, for less confusion with `quarto_binary_sitrep()` (thanks, @jennybc).

# quarto 1.4.4

Expand Down
3 changes: 2 additions & 1 deletion R/quarto.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
#' @export
quarto_path <- function() {
path_env <- get_quarto_path_env()
if (is.na(path_env)) {
quarto_path <- if (is.na(path_env)) {
path <- unname(Sys.which("quarto"))
if (nzchar(path)) path else NULL
} else {
path_env
}
normalizePath(quarto_path, winslash = "/")
}

get_quarto_path_env <- function() {
Expand Down

0 comments on commit 3286df2

Please sign in to comment.