quarto-dev / quarto-dev/quarto-cli

.rmarkdown file doesn't get cleaned up when interrupting Render

Open
#7,125 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

I have a .qmd file with a space in the file name (e.g. 'Test Reprex.qmd'). When I click 'Render' in RStudio, I observe that Test-Reprex.rmarkdown is created in the project directory. If, however, I stop execution, Test-Reprex.rmarkdown remains, and if I then try and re-render I get an error:

Error: The name of the input file cannot contain the special shell characters: [ <>()|\:&;#?*'] (attempted to copy to a version without those characters 'Test-Reprex.rmarkdown' however that file already exists)
Execution halted

I have to manually delete Test-Reprex.rmarkdown in order for the document to render again.

Steps to reproduce

This appears to happen with any file where there is a space character in the file name. But here's an example .qmd below.

File name: 'Test Reprex.qmd'

---
title: "File Already Exists Bug"
format: html
---

## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.

Expected behavior

The .rmarkdown file should be cleaned up and deleted when stopping execution in RStudio.

Actual behavior

The .rmarkdown file remains present in the directory, and the qmd will not render until it is manually deleted.

Your environment
  • IDE: RStudio 2023.06.2 Build 561
  • Windows 11
Quarto check output
A new release of Deno is available: 1.28.2 → 1.37.1 Run `deno upgrade` to install it.

[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.3.450
      Path: C:\Users\dranzolin\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

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

[>] Checking Python 3 installation....(None)

      Unable to locate an installed version of Python 3.
      Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........OK
      Version: 4.2.1
      Path: C:/PROGRA~1/R/R-42~1.1
      LibPaths:
        - C:/Users/dranzolin/AppData/Local/R/win-library/4.2
        - C:/Program Files/R/R-4.2.1/library
      knitr: 1.43
      rmarkdown: 2.16

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

Edit: formatting

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

Reproduce the interruption in RStudio on Windows with the mentioned Test Reprex.qmd input and observe the generated Test-Reprex.rmarkdown. Trace the Render interruption and cleanup path, then verify that stopping execution removes the generated file and allows the same QMD file to render again without manual deletion.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.