Skip to content

Quarto render fails when Windows username contains ampersand #17712

Closed

Description

@gtritchie

System details

RStudio Edition : Desktop
RStudio Version : 2026.04.0+526
OS Version      : Windows 10
R Version       : (any)

Steps to reproduce the problem

  1. On Windows, use a user account whose name contains an ampersand (e.g. gary&ritchie), so the home folder is something like C:\Users\gary&ritchie.
  2. Open RStudio 2026.04.0+526 as that user.
  3. Create or open any Quarto document and click Render (HTML output).

Describe the problem in detail

Rendering fails with an error like:

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

The path is being truncated at the &, so only C:\Users\gary is passed to the shell instead of the full C:\Users\gary&ritchie. The ampersand is being interpreted by cmd.exe as a command separator, indicating the path is not being properly quoted/escaped when invoked.

This is a regression: it does not reproduce with RStudio 2026.01.2 (which bundled Quarto 1.8.25). The current release (2026.04.0) bundles Quarto 1.9.37. It is not yet clear whether the bug lives in RStudio's invocation of Quarto or in Quarto itself.

Reported on the Posit Community forum: https://forum.posit.co/t/failure-in-rendering-a-quarto-doc-from-rstudio-due-to-in-user-folder-name/211658

Reproduced locally with 2026.04.0+526 against a Windows account named gary&ritchie.

Describe the behavior you expected

The Quarto document renders successfully regardless of special characters (including &) in the user's home folder path, as it did in 2026.01.2.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on May 20, 2026
  2. added theissue type on May 20, 2026
  3. gtritchie commented on May 20, 2026

    @gtritchie
    MemberAuthor

    This seems to be a Quarto issue. After seeing it work correctly with RStudio 2026.01 (with bundled Quarto 1.8), then I installed standalone Quarto 1.9.37 (which RStudio then uses) and the bug starts happening.

  4. gtritchie commented on May 20, 2026

    @gtritchie
    MemberAuthor

    If you install standalone Quarto for only the current user (the one with an ampersand in the name) then other failures happen, even with Quarto 1.8.

    So, as a workaround, install Quarto 1.8.27 via https://github.com/quarto-dev/quarto-cli/releases/download/v1.8.27/quarto-1.8.27-win.msi for All users of the machine (not just the current user).

  5. gtritchie commented on May 20, 2026

    @gtritchie
    MemberAuthor

    Confirmation that the problem is Quarto, not RStudio:

    -- repro the problem, note gary&ritchie username/folder --
    
    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/
    
  6. self-assigned this
    on May 25, 2026
  7. added this to the Blue Plumbago milestone on May 25, 2026
  8. gtritchie commented on May 25, 2026

    @gtritchie
    MemberAuthor
  9. added 2 commits that reference this issue on May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugescapeeexternalnewquarto

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions