FR: Auto-detect Quarto's bundled pandoc as fallback

未关闭
#110 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
r
领域
cli, tooling

调研方向

从提到的 CLI 入口点 btw_tool_docs_help_page 开始,检查它如何检查 rmarkdown::pandoc_available()。验证针对 macOS、Windows 和 Linux 提出的 Quarto 路径,然后确认检测到的捆绑 pandoc 会在当前会话中可用,同时在未找到任何 pandoc 时不改变现有错误。

由索引模型根据 Issue 内容生成。

描述

(Potential upstream issue.)

Hi folks.

I just ran into this error on a new laptop, whilst calling some of the btw help documentation tools (e.g., btw_tool_docs_help_page) from the CLI:

Mcp error: -32603: pandoc is required and was not found (see the help page ?rmarkdown::pandoc_available).

The error is obvious enough; I didn't have pandoc installed as a "standalone" binary and available on my PATH (via my package manager). OTOH it's not the full truth, since I do have Quarto installed and this obviously bundles its own pandoc. I can imagine that other users are in a similar boat and this made me think that having a fallback option to / check for Quarto pandoc would be a useful feature.

What do you think about adding automatic detection of Quarto's bundled pandoc as a fallback when rmarkdown::pandoc_available() returns FALSE? Specifically, we could check common Quarto installation paths:

  • macOS: /Applications/quarto/bin/tools/pandoc
  • Windows: ~/AppData/Local/Programs/Quarto/bin/tools/pandoc
  • Linux: /opt/quarto/bin/tools/pandoc

If found we could set Sys.setenv(RSTUDIO_PANDOC = <path>) to make it available to rmarkdown during this session?

主要语言
R
星标
150
派生
13
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

posit-dev/btw 的其他 Issue

查看 posit-dev/btw 的全部 Issue

相似的 Issue

更多 R Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。