From c123d7bf32a5890e7bb6ba80d11c94b6549c387d Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Fri, 3 Jun 2022 23:22:24 +0530 Subject: [PATCH] Use new path for Renviron --- repo2docker/buildpacks/r.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/repo2docker/buildpacks/r.py b/repo2docker/buildpacks/r.py index b60bb1d5..3ac0a77b 100644 --- a/repo2docker/buildpacks/r.py +++ b/repo2docker/buildpacks/r.py @@ -302,9 +302,9 @@ class RBuildPack(PythonBuildPack): # Set paths so that RStudio shares libraries with base R # install. This first comments out any R_LIBS_USER that # might be set in /etc/R/Renviron and then sets it. - r""" - sed -i -e '/^R_LIBS_USER=/s/^/#/' /etc/R/Renviron && \ - echo "R_LIBS_USER=${R_LIBS_USER}" >> /etc/R/Renviron + rf""" + sed -i -e '/^R_LIBS_USER=/s/^/#/' /opt/R/{self.r_version}/lib/R/etc/Renviron && \ + echo "R_LIBS_USER=${{R_LIBS_USER}}" >> /opt/R/{self.r_version}/lib/R/etc/Renviron """, ), ( @@ -317,8 +317,6 @@ class RBuildPack(PythonBuildPack): r""" R RHOME && \ mkdir -p /usr/lib/R/etc /etc/rstudio && \ - echo 'options(repos = c(CRAN = "{cran_mirror_url}"))' > /usr/lib/R/etc/Rprofile.site && \ - echo 'options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version$platform, R.version$arch, R.version$os)))' >> /usr/lib/R/etc/Rprofile.site && \ echo 'r-cran-repos={cran_mirror_url}' > /etc/rstudio/rsession.conf """.format( cran_mirror_url=cran_mirror_url