ThinkR-open / ThinkR-open/squash

bug: `compile_qmd_course()` doesn't work if we compile outside of `tempdir`

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
9
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Description

for (i in 1:10){
  write(file = sprintf("test%s.qmd", i),
        sprintf("---
title: 'test%s'
---

## Quarto is cool.", i)
  )
}

> list.files(pattern = "\\.qmd$", full.names = TRUE) |>
   squash::compile_qmd_course(
     output_dir = "mycoursehere",
     output_html = "complete_course.html",
     quiet = FALSE
   ) -> html_file
✔ All qmd rendered.

> browseURL(html_file)
Error in browser(if (encodeIfNeeded) URLencode(url) else url) : 
  File not exists

Contributor guide

No contributing guide indexed for this repository

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

Start at compile_qmd_course() and reproduce the issue's example with output_dir="mycoursehere" outside tempdir. Trace how the returned html_file is constructed and verify it points to an existing file; done means browseURL(html_file) succeeds for the generated complete_course.html.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.