quarto-dev / quarto-dev/quarto-cli
Conflict between --output-dir and --output
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
This is my minimal reproducible code. My question is whether there is a conflict between --output-dir and --output.
If my current path is /quarto_test, running the command
quarto render /quarto_test/mini_repeat.qmd --to docx
will generate mini_repeat.docx in the /quarto_test directory.
If I run the command
quarto render /quarto_test/mini_repeat.qmd --to docx --output-dir /quarto_test/test/
it will generate mini_repeat.docx in the /quarto_test/test/ directory.
However, if I run the command
quarto render /quarto_test/mini_repeat.qmd --to docx --output-dir /quarto_test/test/ --output test.docx
it will generate test.docx in the /quarto_test directory.
Steps to reproduce
---
title: "Reproducible Quarto Document"
format: docx
engine: jupyter
---
This is a minimal self-contained reproducible Quarto document using `format: html` and `knitr` engine.
It is written in Markdown and contains embedded R code.
```{python}
print("Hello, world!")
```

The end.
`````
### Expected behavior
I would like test.docx to be generated in the /quarto_test/test/ directory.
### Actual behavior
I would like test.docx to be generated in the /quarto_test/ directory.
### Your environment
ubuntu 22.04 vscode terminal
### Quarto check output
```
Quarto 1.5.45
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.45
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2024.06
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/jade/.TinyTeX/bin/x86_64-linux
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.9.6 (Conda)
Path: /home/jade/anaconda3/envs/fnirs/bin/python
Jupyter: 5.7.2
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.0
Path: /usr/lib/R
LibPaths:
- /home/jade/R/x86_64-pc-linux-gnu-library/4.4
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.46
rmarkdown: 2.26
[✓] Checking Knitr engine render......OK
```
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 behavior with the two quarto render commands in the issue on Ubuntu and compare how --output-dir and --output determine the output path. The work is done when test.docx is generated inside /quarto_test/test/ while preserving the documented default behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100