r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
646 stars 57 forks source link

pak install from source should fail, probably #469

Open gaborcsardi opened 1 year ago

gaborcsardi commented 1 year ago

This is difficult, because it probably should not fail on various CRAN servers that test pak w/o suggested packages.

OTOH, install.packages() never actually fails, so you can't use install.packages() in a Dockerfile and assume that the package is installed if it is successful:

root@0030e21bddf6:/opt# Rscript -e 'install.packages("zxzxzxzx")'
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning message:
package ‘zxzxzxzx’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

root@0030e21bddf6:/opt# echo $?
0

Cf. https://github.com/tidyverse/dplyr/issues/6794