Skip to content

Commit 65f8943

Browse files
committed
check, knitr - Add .exe to binary on Windows for correct check of existence
1 parent 84c6cba commit 65f8943

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
@@ -69,6 +69,10 @@ All changes included in 1.8:
6969

7070
- ([#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.
7171

72+
### `knitr`
73+
74+
- 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.
75+
7276
## Other fixes and improvements
7377

7478
- ([#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)