Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check path to R and Rscript before calling #135

Open
TimTaylor opened this issue Nov 27, 2024 · 0 comments
Open

Check path to R and Rscript before calling #135

TimTaylor opened this issue Nov 27, 2024 · 0 comments

Comments

@TimTaylor
Copy link
Contributor

Currently if you have multiple builds of R installed on your system then, irrespective of the one being run, build_install_test() will call in to the default R. I ran in to this when testing on an R-devel install this morning. This can be resolved by querying the R path before constructing the call ...

E.g. replacing

system2("R", args=c("CMD", "build", "--no-build-vignettes", "--no-manual", shQuote(pkg)))

by

system2(file.path(R.home("bin"), "R")
              , args=c("CMD", "build", "--no-build-vignettes", "--no-manual", shQuote(pkg)))

with similar changes for Rscript and a slightly different incantation for Windows.

I've made PR #134 to implement this change. Currently it is marked as a draft as I have only checked it works on a linux machine not Windows. I'll try and sort a windows check over the next couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant