You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Windows file locking error when rendering with --output-dir
When --output-dir is used without a project file, Quarto creates a
synthetic project context with a temporary .quarto directory to manage
the render. This fix ensures file handles are closed before attempting
to remove the directory, preventing Windows "os error 32" (file in use
by another process).
The synthetic project pattern:
- Triggered when: quarto render file.qmd --output-dir output/ (no _quarto.yml)
- Creates temporary .quarto directory in current directory
- Uses full renderProject() path (not singleFileProjectContext())
- forceClean flag in RenderOptions signals cleanup needed
- After render: close handles (context.cleanup()) then remove directory
Improved comments to explain the synthetic project pattern, the dual
purpose of the forceClean flag, and critical ordering requirements to
avoid file locking issues on Windows.
Fixes#13625
Copy file name to clipboardExpand all lines: news/changelog-1.9.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,4 +61,5 @@ All changes included in 1.9:
61
61
- ([#13402](https://github.com/quarto-dev/quarto-cli/issues/13402)): `nfpm` (<https://nfpm.goreleaser.com/>) is now used to create the `.deb` package, and new `.rpm` package. Both Linux packages are also now built for `x86_64` (`amd64`) and `aarch64` (`arm64`) architectures.
62
62
- ([#13528](https://github.com/quarto-dev/quarto-cli/pull/13528)): Adds support for table specification using nested lists and the `list-table` class.
63
63
- ([#13575](https://github.com/quarto-dev/quarto-cli/pull/13575)): Improve CPU architecture detection/reporting in macOS to allow quarto to run in virtualized environments such as OpenAI's `codex`.
64
+
- ([#13625](https://github.com/quarto-dev/quarto-cli/issues/13625)): Fix Windows file locking error (os error 32) when rendering with `--output-dir` flag. Context cleanup now happens before removing the temporary `.quarto` directory, ensuring file handles are properly closed.
64
65
- ([#13656](https://github.com/quarto-dev/quarto-cli/issues/13656)): Fix R code cells with empty `lang: ""` option producing invalid markdown class attributes.
0 commit comments