quarto has different `.Rprofile` behavior in Single File mode depending if `--output-dir` is used
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, r
- 領域
- cli
調査の方向性
Start by reproducing the two quarto render commands with --execute-dir and with both --execute-dir and --output-dir, then trace the CLI's Single File execution-directory handling. Compare how R is launched in each case and verify that both commands load the .Rprofile from the execution directory when done.
索引モデルが issue の本文から書いたものです。
説明
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When using the --execute-dir <dir1> option R will be launched from the target directory <dir1> thus using the .Rprofile of that directory, this is regardless of where the source file lives.
However if you also provide --output-dir <dir2> R will instead be launched from the directory of the source file thus ignoring any .Rprofile file in <dir1> or <dir2>. I'm not 100% sure but I think in this case you are launching R from the source file directory and then internally running setwd() to move the directory to <dir1>. This issue occurs even if <dir1> and <dir2> are the same directory.
Steps to reproduce
> tree -a
.
├── .Rprofile
├── code
│ └── test2.qmd
└── runme.sh
.Rprofile
cat("hi from code/.Rprofile\n")
cat("getwd() = ", getwd(), "\n")
test2.qmd
---
title: "Untitled"
format: html
---
```{r}
getwd()
```
runeme.sh
quarto render \
code/test2.qmd \
--execute-dir $(pwd) \
--metadata "embed-resources: true"
quarto render \
code/test2.qmd \
--output-dir "$(pwd)" \
--execute-dir "$(pwd)" \
--metadata "embed-resources: true"
Actual behavior
The first render attempt (just using --execute-dir) makes use of the .Rprofile and produces stdout of:
> quarto render \
code/test2.qmd \
--execute-dir $(pwd) \
--metadata "embed-resources: true"
hi from .Rprofile
getwd() = /Users/gowercr1/Desktop/Work/xxx-testing-quarto
processing file: test2.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: test2.knit.md
The second render however does not load the .Rprofile
> quarto render \
code/test2.qmd \
--output-dir "$(pwd)" \
--execute-dir "$(pwd)" \
--metadata "embed-resources: true"
processing file: test2.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: test2.knit.md
Expected behavior
Both should use the .Rprofile from the execution directory
Your environment
MacOS - 26.6.2
R version 4.6.1 (2026-06-24) -- "Happy Hop"
quarto --version
1.10.18
Quarto check output
> quarto check
Quarto 1.10.18
[✓] Checking environment information...
Quarto cache location: /Users/gowercr1/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.7.14: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.10.18
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /Library/TeX/texbin
Version: 2026
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.6.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.6/Resources/library
knitr: 1.51
rmarkdown: 2.32
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Library/Developer/CommandLineTools/usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking Julia installation...
- 主要言語
- JavaScript
- スター
- 6.1k
- フォーク
- 463
- 平均マージ
- 21時間 14分
- マージ済み PR(30日)
- 60
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto-cli のほかの issue
-
bug callouts regression revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
quarto-dev/quarto-cli#15014 ·
メンテナーはふだん 1 日以内に返信
-
Website navbar hides the notebook preview header対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンaccessibility bug embed websites
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/quarto-cli#14972 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
accessibility documentation revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
quarto-dev/quarto-cli#14971 ·
メンテナーはふだん 1 日以内に返信
-
accessibility revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
quarto-dev/quarto-cli#14970 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
a11y: notebook preview header is outside any landmark対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンaccessibility embed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
quarto-dev/quarto-cli#14968 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dusk-network/exu#17 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
jspreadsheet/ce#1809 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
githubnext/gh-aw-workshop#4458 ·
メンテナーはふだん 1 日以内に返信
-
Add: Cartoonitoオープンcheck:failed feeds:add
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
iptv-org/database#37390 · コメント 1 件 ·
メンテナーはふだん 9 日以内に返信
-
bug: directory index route root priority is overwritten when wildcard is false対応中かも @TalhaHunter101 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
fastify/fastify-static#617 ·