diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 4dddd36225f4..10891383411b 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -86,9 +86,17 @@ export _R_CHECK_FORCE_SUGGESTS_=0 # fails tests if either ERRORs or WARNINGs are thrown by # R CMD CHECK +check_succeeded="yes" R CMD check ${PKG_TARBALL} \ --as-cran \ -|| exit -1 +|| check_succeeded="no" + +echo "R CMD check build logs:" +cat ${BUILD_DIRECTORY}/lightgbm.Rcheck/00install.out + +if [[ $check_succeeded == "no" ]]; then + exit -1 +fi if grep -q -R "WARNING" "$LOG_FILE_NAME"; then echo "WARNINGS have been found by R CMD check!"