Skip to content

Quarto render fails when Windows username contains ampersand #14534

@gtritchie

Description

@gtritchie

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 rstudio/rstudio#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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingthemesRelated to HTML theming or any other style related issue (like highlight-style)windows

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions