quarto-dev / quarto-dev/quarto-cli
Don't show stack traces to end users
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 happens with multiple commands. Here's one where the problem is a user error with "Book contents must include a home page (e.g. index.md)". This error is accurate. The project is indeed broken. This is in no way a bug in Quarto's own code, and therefore because it is not a bug in Quarto's own code, showing a stack trace of correctly functioning Quarto code to the end user is not helpful. It's needless log junk that should not be printed. The problem cannot be debugged or fixed by digging into Quarto code. That's a distraction.
~/waves$ quarto preview /Users/elharo/waves/preface.qmd --no-browser --no-watch-inputs
ERROR: Book contents must include a home page (e.g. index.md)
Stack trace:
at bookRenderItems (file:///Applications/quarto/bin/quarto.js:139457:11)
at eventLoopTick (ext:core/01_core.js:178:7)
at async Object.bookProjectConfig [as config] (file:///Applications/quarto/bin/quarto.js:139328:23)
at async projectContext (file:///Applications/quarto/bin/quarto.js:118707:28)
at async _Command.actionHandler (file:///Applications/quarto/bin/quarto.js:149031:21)
at async _Command.execute (file:///Applications/quarto/bin/quarto.js:9840:7)
at async _Command.parseCommand (file:///Applications/quarto/bin/quarto.js:9717:14)
at async quarto (file:///Applications/quarto/bin/quarto.js:175538:5)
at async file:///Applications/quarto/bin/quarto.js:175566:5
at async file:///Applications/quarto/bin/quarto.js:175421:14
~/waves$
Steps to reproduce
No response
Actual behavior
prints a stack trace
Expected behavior
print the error message without a stack trace
Your environment
Mac OS X, VSCode with Quarto extension
Quarto check output
$ quarto check
Quarto 1.8.26
[✓] Checking environment information...
Quarto cache location: /Users/elharo/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.3.1: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.8.26
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Tex: (not detected)
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.14.2
Path: /opt/homebrew/opt/python@3.14/bin/python3.14
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
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 failure with quarto preview /Users/elharo/waves/preface.qmd --no-browser --no-watch-inputs and inspect the error path around bookRenderItems in the Quarto CLI. Done means user-facing errors such as the missing home page message are printed without a stack trace, while the actionable error text remains visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100