diff --git a/helper.sh b/helper.sh index 0801692..94aa88e 100755 --- a/helper.sh +++ b/helper.sh @@ -54,7 +54,12 @@ case "$1" in k|-k|kernel|--kernel) enable_venv "$2" mkdir -p "$R_LIBS_SITE" - Rscript -e 'install.packages("IRkernel",repos="http://cran.us.r-project.org");library(IRkernel);IRkernel::installspec()' + if command -v Rscript >> /dev/null; then + Rscript -e 'install.packages("IRkernel",repos="http://cran.r-project.org");library(IRkernel);IRkernel::installspec()' + else + echo "R isn't installed" + exit 1 + fi ;; c|-c|check|--check)