I'm building docker containers with R, with lines like:
RUN Rscript -e 'install.packages("tidyverse", "text2vec")'
However, if there are failures installing one of the packages, even thought there is "...had non-zero exit status" logged, the docker build just carries on.
How can I make Rscript fail with an error code if install.packages
had an error installing one of its packages?