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

fix(to_html): quarto_render() doesn't allow absolute paths for output anymore #73

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

gadenbuie
Copy link
Collaborator

Fixes #71

quarto render --output /an/absolute/path throws an error that

ERROR: --output option cannot specify a relative or absolute path

We were previously giving quarto_render() an absolute path, but the path points to a location in the same directory as the source file. quarto render must have previously been more forgiving in this case, but now it detects the absolute path and throws.

This PR just makes the temp file path relative for the render step, which is fine for both rmarkdown::render() and quarto::quarto_render().

@jhelvy
Copy link
Owner

jhelvy commented Oct 6, 2023

Ah yes I've had plenty of issues with this myself. Really annoying that you can't render to anything but the current dir with Quarto (at least that's my understanding). I even wrote a function in my personal jph package called quarto_render_move to deal with this. Might have to update that function as your solution here looks better.

@jhelvy jhelvy merged commit b7223e1 into main Oct 6, 2023
5 of 6 checks passed
@gadenbuie
Copy link
Collaborator Author

Ah yes I've had plenty of issues with this myself. Really annoying that you can't render to anything but the current dir with Quarto (at least that's my understanding).

IIUC it's possible with quarto render via --output-dir, but that feature isn't exposed in quarto::quarto_render(). Relevant: quarto-dev/quarto-r#126 and quarto-dev/quarto-r#81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRAN check failure: package 'quarto' but has not declared a SystemRequirements
2 participants