diff --git a/.ci/test-r-package.sh b/.ci/test-r-package.sh index 6db0beb8293b..f60278a285ca 100755 --- a/.ci/test-r-package.sh +++ b/.ci/test-r-package.sh @@ -19,7 +19,7 @@ if [[ $R_BUILD_TYPE != "cran" ]]; then fi # Get details needed for installing R components -R_MAJOR_VERSION=( "${R_VERSION//./ }" ) +IFS='.' read -ra R_MAJOR_VERSION <<< "$R_VERSION" if [[ "${R_MAJOR_VERSION[0]}" == "3" ]]; then export R_MAC_VERSION=3.6.3 export R_MAC_PKG_URL=${CRAN_MIRROR}/bin/macosx/R-${R_MAC_VERSION}.nn.pkg diff --git a/.ci/test.sh b/.ci/test.sh index b0a8dbd0d766..99a0e3737908 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -131,9 +131,11 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then source activate $CONDA_ENV # check reStructuredText formatting cd "${BUILD_DIRECTORY}/python-package" - rstcheck --report-level warning "$(find . -type f -name "*.rst")" || exit 1 + find . -type f -name "*.rst" -exec \ + rstcheck --report-level warning {} + || exit 1 cd "${BUILD_DIRECTORY}/docs" - rstcheck --report-level warning --ignore-directives=autoclass,autofunction,autosummary,doxygenfile "$(find . -type f -name "*.rst")" || exit 1 + find . -type f -name "*.rst" -exec \ + rstcheck --report-level warning --ignore-directives=autoclass,autofunction,autosummary,doxygenfile {} + || exit 1 # build docs make html || exit 1 if [[ $TASK == "check-links" ]]; then