quarto-dev / quarto-dev/quarto-cli
output file name conflict when two formats targets same extension (like html and revealjs)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When defining both html and revealjs formats in the config (_quarto.yml), if format is not defined in individual qmd files, it gives this error:
ERROR: NotFound: No such file or directory (os error 2), rename '/home/user/Desktop/test/report.html' -> '/home/user/Desktop/test/_site/report.html'
To reproduce, create three files:
_quarto.yml
project:
type: website
website:
title: "Test"
format:
html:
theme: "flatly"
revealjs:
theme: "beige"
presentation.qmd
---
title: "Presentation"
format: revealjs
---
## Slide 1
This is a presentation
## Slide 2
More contents here
report.qmd
---
title: "Report"
---
## Heading 1
This is a report
Then run quarto render. Adding format: html to report.qmd fixes this issue.
It took me a while to troubleshoot as the error message was not helpful.
🢒 quarto --version
1.2.1
🢒 lsb_release -a
No LSB modules are available.
Distributor ID: Zorin
Description: Zorin OS 16.2
Release: 16
Codename: focal
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the conflict using _quarto.yml, presentation.qmd, and report.qmd, then run quarto render with both html and revealjs formats configured. Confirm that the report output collides and produces the rename error; done means rendering succeeds without requiring format: html in report.qmd and both outputs are written correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100