quarto-dev / quarto-dev/quarto-cli

Quarto render fails when Windows username contains ampersand

Open
#14,534 1 comment 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since May 21, 2026.

bug themes windows
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

Originally reported via RStudio, but have confirmed it is a Quarto issue (happens from terminal, outside RStudio, with a trivial example). Details in https://github.com/rstudio/rstudio/issues/17712.

In short, when using Quarto via a Windows user account that has an ampersand in the username, rendering will not work. This worked with Quarto 1.8, but fails with 1.9.

There's a related bug that happens with both 1.8 and 1.9 if you install Quarto per-user with this gary&ritchie style username, Quarto fails with a different error message (didn't capture it). Installing for all users (i.e. outside the troublesome path) avoids this problem.

Steps to reproduce
  • Create a Windows user account that has an ampersand, e.g. C:\Users\gary&ritchie\ and login as that user
  • With Quarto 1.9.37, and a trivial Quarto doc (I used whatever RStudio creates for a new Quarto doc project) somewhere in the user's profile (e.g. C:\Users\gary&ritchie\Documents\bug-repro\bug-repro.qmd) try to render using the same command-line that RStudio uses

Here's a transcript showing this failing with 1.9, and working with 1.8:

C:\Users\gary&ritchie\Documents\bug-repro>quarto --version
1.9.37

C:\Users\gary&ritchie\Documents\bug-repro>quarto preview bug-repro.qmd --to default --no-watch-inputs --no-browse


processing file: bug-repro.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: bug-repro.knit.md

ERROR: Theme file compilation failed:

'C:\Users\GARY' is not recognized as an internal or external command,
operable program or batch file.

Stack trace:
    at processResult (file:///C:/Program Files/Quarto/bin/quarto.js:79152:13)
    at dartCommand (file:///C:/Program Files/Quarto/bin/quarto.js:79169:12)
    at eventLoopTick (ext:core/01_core.js:179:7)
    at async dartCompile (file:///C:/Program Files/Quarto/bin/quarto.js:79120:3)
    at async file:///C:/Program Files/Quarto/bin/quarto.js:87618:9
    at async SassCache.setFromHash (file:///C:/Program Files/Quarto/bin/quarto.js:80054:11)
    at async compileSass (file:///C:/Program Files/Quarto/bin/quarto.js:87429:19)
    at async resolveSassBundles (file:///C:/Program Files/Quarto/bin/quarto.js:125158:17)
    at async resolveExtras (file:///C:/Program Files/Quarto/bin/quarto.js:129822:14)
    at async runPandoc (file:///C:/Program Files/Quarto/bin/quarto.js:129246:20)


-- downgrade to 1.8.27, problem goes away --

C:\Users\gary&ritchie\Documents\bug-repro>quarto --version
1.8.27

C:\Users\gary&ritchie\Documents\bug-repro>quarto preview bug-repro.qmd --to default --no-watch-inputs --no-browse


processing file: bug-repro.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: bug-repro.knit.md

pandoc
  to: html
  output-file: bug-repro.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  variables: {}

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  editor: visual
  title: bug-repro

Output created: bug-repro.html

Watching files for changes
Browse at http://localhost:4691/bug-repro.html
Listening on http://127.0.0.1:4691/

Actual behavior
  • With Quarto 1.8.25 and 1.8.27, this works (RStudio 2026.01 bundled 1.8).
  • With Quarto 1.9.37 it fails with 'C:\Users\GARY' is not recognized as an internal or external command, operable program or batch file. (RStudio 2026.05 bundled 1.9)
Expected behavior

Everything works despite the ampersand in the user profile name.

Ideally, installing Quarto per-user with such a name should also work, but probably a separate issue.

Your environment

Windows-11 Pro, x64

Quarto check output

I installed Quarto standalone via the MSI installer, using 1.8.27 and 1.9.37.

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.