quarto-dev / quarto-dev/quarto
Quarto not detecting subdirectories when using symlinks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 645
- Forks
- 62
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 13
Description
Bug description
Quarto is failing to render a simple document with error
ERROR: Refusing to remove directory /g/data/lo70/ec0044/ensoceof/analysis/test/test_files that isn't a subdirectory of /home/565/ec0044/ensoceof/analysis/test
In my case, /home/565/ec0044/ensoceof/ is a symlink to /g/data/lo70/ec0044/ensoceof/, so the error is not correct. This only happens when using positron and not in RStudio or the terminal. I believe the reason might be that positron does
quarto preview /home/565/ec0044/ensoceof/analysis/test/test.qmd --no-browser --no-watch-inputs --output-dir /scratch/lo70/ec0044/tmp/tmp-2028405-xv6VpRj8kWE3 --embed-resources
while RStudio does
quarto preview test.qmd --to html --no-watch-inputs --no-browse
That is, Positron is specifying an absolute path, while RStudio is using a relative path.
In any case, the command using absolute paths should not fail here. It seems an issue with the logic trying to detect subdirectories. I supposed it could be fixed by using the realpath of each dir. (realpath /home/565/ec0044/ensoceof/analysis/test is /g/data/lo70/ec0044/ensoceof/analysis/test).
Steps to reproduce
No response
Actual behavior
No response
Expected behavior
No response
Your environment
No response
Contributor guide
No contributing guide indexed for this repository
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 by reproducing the Positron command with the symlinked project path and compare it with the relative-path command used by RStudio. Trace the directory-containment check that emits the refusal, then verify that equivalent real paths are accepted without allowing unrelated directories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100