quarto-dev / quarto-dev/quarto-cli
Incorrect priority in the processing chain: Quarto complains about unknown options when using unknown commands.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
This error is not document-related, but rather points to a problem in the command options processing chain. If an unknown command is entered (for example, due to a typo), the CLI program complains about unknown options.
However, it should actually be complaining about an unknown command, since the options logically belong to the respective commands.
Steps to reproduce
quarto ender ~/Desktop/hello.qmd --output -
Actual behavior
Quarto complains about missing options:
ERROR: Unknown option "--output". Did you mean option "--help"?
Expected behavior
Quarto shall complain about an unknown command instead (here "ender") !
Your environment
- IDE: None, CLI only
- OS: Linux Mint 22.3 (ISO)
Quarto check output
quarto check
Quarto 1.9.29
[✓] Checking environment information...
Quarto cache location: /home/mint/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.29
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Tex: (not detected)
[✓] Checking Chrome Headless....................OK
Chrome: (not detected)
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
[✓] Checking Python 3 installation....OK
Version: 3.12.3
Path: /usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking Julia installation...
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
Start by reproducing quarto ender ~/Desktop/hello.qmd --output - with the Quarto CLI and trace the command and option processing entry points. The fix is complete when the same unknown command reports ender as unknown instead of reporting --output as an unknown option, with relevant CLI tests passing.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100