Skip to content

Commit 4c44c81

Browse files
authored
Merge pull request #12887 from quarto-dev/windows/rscript-detection
check, knitr - Add .exe to binary on Windows for correct check
2 parents 29b6a61 + 65f8943 commit 4c44c81

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

news/changelog-1.8.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ All changes included in 1.8:
7171
- ([#12753](https://github.com/quarto-dev/quarto-cli/issues/12753)): Support change in IPython 9+ and import `set_matplotlib_formats` from `matplotlib_inline.backend_inline` in the internal `setup.py` script used to initialize rendering with Jupyter engine.
7272
- ([#12839](https://github.com/quarto-dev/quarto-cli/issues/12839)): Support for `plotly.py` 6+ which now loads plotly.js using a cdn in script as a module.
7373

74+
### `knitr`
75+
76+
- Correctly detect R binary on Windows when `R_HOME` is set - this fixes issue with `quarto::quarto_render()` that will now correctly use the same R version as the R session it is called from.
77+
7478
## Other fixes and improvements
7579

7680
- ([#11321](https://github.com/quarto-dev/quarto-cli/issues/11321)): Follow [recommendation from LaTeX project](https://latex-project.org/news/latex2e-news/ltnews40.pdf) and use `lualatex` instead of `xelatex` as the default PDF engine.

src/core/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export async function rBinaryPath(
117117
const rHome = Deno.env.get("R_HOME");
118118
debug(`Looking for '${binary}' in R_HOME: ${rHome}`);
119119
if (rHome) {
120-
let rHomeBin = join(rHome, "bin", binary);
120+
let rHomeBin = join(rHome, "bin", isWindows ? binary + ".exe" : binary);
121121
if (safeExistsSync(rHomeBin)) {
122122
debug(`Found in ${rHomeBin}`);
123123
return setPath(rHomeBin);

0 commit comments

Comments
 (0)