quarto-dev / quarto-dev/quarto-cli

DEBUG log level prepends "Quarto version: X.Y.Z" line to stderr for all commands

Open
#14,532 0 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since May 20, 2026.

enhancement
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

When QUARTO_LOG_LEVEL=DEBUG is set (or GitHub Actions debug mode auto-elevates the level), every Quarto subcommand prepends a bare Quarto version: X.Y.Z line to stderr — including commands whose stderr is the data channel that consumers parse, such as quarto list extensions.

Reproduction:

$ QUARTO_LOG_LEVEL=DEBUG quarto list extensions
Quarto version: 1.9.37
Id                        Version    Contributes
quarto-ext/fontawesome    1.3.0      shortcodes

The same line shows up on error output of other commands (quarto inspect, quarto render with a fatal error, etc.).

Source of the diagnostic:

https://github.com/quarto-dev/quarto-cli/blob/36e2232273cb9de9af82f2bbb946a0a36808b425/src/quarto.ts#L161

The log level is auto-elevated to DEBUG when GitHub Actions runs with debug logging on (RUNNER_DEBUG=1):

https://github.com/quarto-dev/quarto-cli/blob/36e2232273cb9de9af82f2bbb946a0a36808b425/src/core/log.ts#L104-L111

Impact: any tool that parses Quarto CLI stderr breaks under DEBUG. The R quarto package's quarto_list_extensions() parses quarto list extensions stderr with read.table(header = TRUE); under DEBUG, the prepended version line is consumed as the header row and downstream code fails with argument 1 is not a vector. We hit this in quarto-dev/quarto-r CI any time the workflow is re-run with debug logging.

We could:

  • Route this diagnostic through the structured log handler (with level prefix and timestamp) so it lands in --log output rather than as a bare line on stderr, or
  • Gate it on TRACE rather than DEBUG, since DEBUG is auto-enabled by CI debug mode and a number of code paths legitimately want DEBUG without the version preamble polluting stdout/stderr consumers.

Either approach keeps the diagnostic available without breaking programmatic consumers of CLI output.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.