diff --git a/build-cran-package.sh b/build-cran-package.sh index 6558afcf77ad..1c8a5dfbdc48 100755 --- a/build-cran-package.sh +++ b/build-cran-package.sh @@ -132,7 +132,7 @@ cd "${TEMP_R_DIR}" using_windows_and_r3=$( Rscript -e 'cat(.Platform$OS.type == "windows" && R.version[["major"]] < 4)' ) - if [[ ${using_windows_and_r3} == "TRUE" ]]; then + if test "${using_windows_and_r3}" = "TRUE"; then LGB_CXX_STD="C++11" fi sed -i.bak -e "s/~~CXXSTD~~/${LGB_CXX_STD}/" DESCRIPTION