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

quarto render foo.qmd -o bar.pdf deletes foo.pdf #7780

Closed
barryrowlingson opened this issue Dec 4, 2023 · 1 comment
Closed

quarto render foo.qmd -o bar.pdf deletes foo.pdf #7780

barryrowlingson opened this issue Dec 4, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@barryrowlingson
Copy link

Bug description

If I run quarto on the command line to render file foo.qmd with output: pdf I get foo.pdf, but if I render with -o bar.pdf I get bar.pdf but an existing foo.pdf gets unexpectedly deleted.

Steps to reproduce

  1. Create a minimal foo.qmd file.
  2. Run quarto render foo.qmd
  3. Observe that foo.pdf now exists
  4. Run quarto render foo.qmd -o bar.pdf
  5. Observe that foo.pdf no longer exists.

Expected behavior

The only change should be the creation of bar.pdf and foo.pdf should be left alone.

Actual behavior

foo.pdf is deleted.

Your environment

quarto --version
1.3.450

Quarto check output

$ quarto check

[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.450
Path: /opt/quarto-1.3.450/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: 5.1.0
Kernels: ir, python3, python2

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
Version: 4.1.1
Path: /opt/R-4.1.1/lib/R
LibPaths:
- /opt/R-4.1.1/lib/R/library
knitr: 1.34
rmarkdown: 2.11

[✓] Checking Knitr engine render......OK

@barryrowlingson barryrowlingson added the bug Something isn't working label Dec 4, 2023
@mcanouil
Copy link
Collaborator

mcanouil commented Dec 4, 2023

Thanks for he report!
That's kind of intended as temporary files / previous files are derived from the input filename.
this is unfortunate and is part of the work that is schedule to occur in 1.5, see #6518.

I am closing this as a duplicate:

Side note: output: pdf is rmarkdown not Quarto. In Quarto, the correct YAML option is format: pdf.

@mcanouil mcanouil closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2023
@mcanouil mcanouil added duplicate This issue or pull request already exists and removed bug Something isn't working labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants