quarto-dev / quarto-dev/quarto-cli
Wrong arg forwarding from preview to render
@cscheid is already working on this.
Since Feb 4, 2024.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
The documentation of quarto preview states that:
You can also include arbitrary command line arguments to be forwarded to
quarto render.
quarto render documents the following CLI parameter:
--output-dir- Write output to DIR (path is input/project relative)
This invocation works fine:
quarto render test.md --output-dir=/tmp
However this fails:
quarto preview test.md --output-dir=/tmp
The reason is that it tries to call pandoc with a wrong argument (--output-dir):
Unknown option --output-dir.
Try pandoc --help for more information.
It seems likely that the argument is incorrectly forwarded to pandoc instead of quarto render.
quarto render itself forwards its remaining arguments to pandoc so perhaps it's being forwarded in a way that makes render not to acknowledge it as its own argument.
Steps to reproduce
Already given above.
Expected behavior
The argument is forwarded as documented and the behavior of render when mediated by preview is equivalent to that when directly invocated.
Actual behavior
Described above.
Your environment
Code 1.86.0
macOS Sonoma 14.3
Quarto check output
Quarto 1.4.549
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.549
Path: /private/tmp/cb/lib/python3.11/site-packages/quarto_cli/bin
[✓] Checking tools....................OK
TinyTeX: v2024.02
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/carlos/Library/TinyTeX/bin/universal-darwin
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.7
Path: /private/tmp/cb/bin/python3
Jupyter: 5.7.1
Kernels: jampp, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.2
Path: /opt/homebrew/Cellar/r/4.3.2/lib/R
LibPaths:
- /Users/carlos/.rlib/base
- /opt/homebrew/lib/R/4.3/site-library
- /opt/homebrew/Cellar/r/4.3.2/lib/R/library
knitr: 1.45
rmarkdown: 2.25
[✓] 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.
Assessment
This issue has not been assessed yet.