Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize quarto_path() #209

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "/", mustWork = FALSE)
}

get_quarto_path_env <- function() {
Expand Down
Loading