quarto-dev / quarto-dev/quarto-cli
resolveGlobs crashes on .quarto/ session temp files (race condition, Windows + Positron)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug
Quarto's resolveGlobs → expandGlobSync → walkSync scans the .quarto/ internal
folder and crashes when it encounters a session temp file that was deleted between the
directory listing and the stat call.
Error
ERROR: NotFound: The system cannot find the file specified. (os error 2):
stat 'D:...quarto\quarto-session-temp851f9d1b786c0286'
at Object.statSync (ext:deno_fs/30_fs.js:415:3)
at createWalkEntrySync (quarto.js:2821)
at walkSync (quarto.js:2948)
at expandGlobSync (quarto.js:3092)
at resolveGlobs (quarto.js:8145)
Behaviour
- Error is triggered by Positron IDE's background project scanner, not by
quarto render quarto render <file>from terminal works without error.quartoignorewith.quarto/does not fix it- Explicit
render:list in_quarto.yamldoes not fix it
Root cause
.quarto/ is not excluded from the project glob walk. It should be auto-excluded like
.git/, since it is Quarto's own internal directory. Additionally, the NotFound error
from stat should be caught and skipped rather than crashing.
Environment
- Quarto 1.9.36
- Windows 11 (10.0.26200)
- Positron IDE
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at resolveGlobs and follow its expandGlobSync and walkSync calls, using the reported stack trace to locate the glob-walking implementation. Verify how internal directories and stat failures are handled, then confirm that .quarto/ is skipped and a deleted session temp file no longer crashes the walk.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- deno, javascript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100