Skip to content
Prev 387155 / 398502 Next

.Rprofile with devtools::install_github() loops

Installing a package involves running several R subprocesses, each of
which is running that .Rprofile.  You may be able to stop the infinite
recursion by setting an environment variable that subprocesses can
check.  E.g. replace
  install_github("xxx/yyy")
with
  if (Sys.getenv("INSTALLING_FROM_GITHUB", unset="no") == "no") {
    Sys.setenv(INSTALLING_FROM_GITHUB="yes")
    install_github("xxx/yyy")
  }

[This is totally untested.]

-Bill
On Wed, Feb 10, 2021 at 12:45 AM Chris Evans <chrishold at psyctc.org> wrote: