quarto-dev / quarto-dev/quarto-cli

`--execute-params` does not check uniqueness of keys

Open
#12,962 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug parameters
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

It appears to be possible to have duplicated keys in the YAML file given to --execute-params. The last key wins.
As for any other YAML, I think Quarto should error out.

Steps to reproduce

A Jupyter example but same is happening using knitr as the engine.

---
engine: jupyter
---

```{python}
#| tags: [parameters]

trans = "log1p"
```

```{python}
trans
```

With YAML file:

trans: "log10"
trans: "log2"
quarto render index.qmd --execute-params test.yml
Actual behavior

Quarto takes the YAML and only the last duplicated keys is used without any warnings/errors.

Expected behavior

An error or at least a warning.

Your environment

No response

Quarto check output
Quarto 99.9.9
[✓] Checking environment information...
      Quarto cache location: /Users/mcanouil/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: 99.9.9
      commit: b5438495f9605043dc96e006d494efee5e850dea
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: v2025.05
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/mcanouil/Library/TinyTeX/bin/universal-darwin
      Version: 2025

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
      Source: QUARTO_CHROMIUM

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.13.1
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-playground/.venv/bin/python
      Jupyter: 5.8.1
      Kernels: julia-1.11, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.5.0
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Users/mcanouil/Projects/quarto-dev/quarto-playground/renv/library/macos/R-4.5/aarch64-apple-darwin20
        - /Users/mcanouil/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.5/aarch64-apple-darwin20/4cd76b74
      knitr: 1.50
      rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

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.

Research direction

Start by reproducing the issue with quarto render index.qmd --execute-params test.yml, using the shown duplicate-key YAML and checking both Jupyter and knitr engines. Trace the --execute-params handling and add regression coverage; done means duplicate keys produce an error or warning instead of silently using the last value.

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
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.