@@ -358,8 +358,8 @@ def get_build_scripts(self):
358
358
# Install a pinned version of devtools, IRKernel and shiny
359
359
rf"""
360
360
export EXPANDED_CRAN_MIRROR_URL="$(. /etc/os-release && echo { cran_mirror_url } | envsubst)" && \
361
- R --quiet -e "install.packages(c('devtools', 'IRkernel', 'shiny'), repos=Sys.getenv(\"EXPANDED_CRAN_MIRROR_URL\"))" && \
362
- R --quiet -e "IRkernel::installspec(prefix=Sys.getenv(\"NB_PYTHON_PREFIX\"))"
361
+ R --vanilla -- quiet -e "install.packages(c('devtools', 'IRkernel', 'shiny'), repos=Sys.getenv(\"EXPANDED_CRAN_MIRROR_URL\"))" && \
362
+ R --vanilla -- quiet -e "IRkernel::installspec(prefix=Sys.getenv(\"NB_PYTHON_PREFIX\"))"
363
363
""" ,
364
364
),
365
365
]
@@ -395,7 +395,7 @@ def get_preassemble_scripts(self):
395
395
"${NB_USER}" ,
396
396
# Delete /tmp/downloaded_packages only if install.R fails, as the second
397
397
# invocation of install.R might be able to reuse them
398
- f"Rscript { installR_path } && touch /tmp/.preassembled || true && rm -rf /tmp/downloaded_packages" ,
398
+ f"Rscript --vanilla { installR_path } && touch /tmp/.preassembled || true && rm -rf /tmp/downloaded_packages" ,
399
399
)
400
400
]
401
401
@@ -413,14 +413,17 @@ def get_assemble_scripts(self):
413
413
"${NB_USER}" ,
414
414
# only run install.R if the pre-assembly failed
415
415
# Delete any downloaded packages in /tmp, as they aren't reused by R
416
- f"""if [ ! -f /tmp/.preassembled ]; then Rscript { installR_path } ; rm -rf /tmp/downloaded_packages; fi""" ,
416
+ f"""if [ ! -f /tmp/.preassembled ]; then Rscript --vanilla { installR_path } ; rm -rf /tmp/downloaded_packages; fi""" ,
417
417
)
418
418
]
419
419
420
420
description_R = "DESCRIPTION"
421
421
if not self .binder_dir and os .path .exists (description_R ):
422
422
assemble_scripts += [
423
- ("${NB_USER}" , 'R --quiet -e "devtools::install_local(getwd())"' )
423
+ (
424
+ "${NB_USER}" ,
425
+ 'R --vanilla --quiet -e "devtools::install_local(getwd())"' ,
426
+ )
424
427
]
425
428
426
429
return assemble_scripts
0 commit comments