Merge pull request #590 from github/FixBug

fix logic hole
This commit is contained in:
Lukas Gravley 2020-08-19 15:16:05 -05:00 committed by GitHub
commit 70e513426b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -456,11 +456,11 @@ GetLinterVersions() {
elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "editorconfig-checker" ]]; then elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "editorconfig-checker" ]]; then
# Need specific command for Protolint and editorconfig-checker # Need specific command for Protolint and editorconfig-checker
mapfile -t GET_VERSION_CMD < <(echo "--version not supported") mapfile -t GET_VERSION_CMD < <(echo "--version not supported")
elif [[ ${LINTER} == "lintr" ]]; then elif [[ ${LINTER} == "lintr" ]]; then
# Need specific command for lintr (--slave is deprecated in R 4.0 and replaced by --no-echo) # Need specific command for lintr (--slave is deprecated in R 4.0 and replaced by --no-echo)
mapfile -t GET_VERSION_CMD < <(R --slave -e "r_ver <- R.Version()\$version.string; \ mapfile -t GET_VERSION_CMD < <(R --slave -e "r_ver <- R.Version()\$version.string; \
lintr_ver <- packageVersion('lintr'); \ lintr_ver <- packageVersion('lintr'); \
glue::glue('lintr { lintr_ver } on { r_ver }')") glue::glue('lintr { lintr_ver } on { r_ver }')")
else else
# Standard version command # Standard version command
mapfile -t GET_VERSION_CMD < <("${LINTER}" --version 2>&1) mapfile -t GET_VERSION_CMD < <("${LINTER}" --version 2>&1)
@ -1004,7 +1004,7 @@ CallStatusAPI() {
########################################################## ##########################################################
# Check to see if were enabled for multi Status mesaages # # Check to see if were enabled for multi Status mesaages #
########################################################## ##########################################################
if [ "${MULTI_STATUS}" == "true" ]; then if [ "${MULTI_STATUS}" == "true" ] && [ -n "${GITHUB_TOKEN}" ] && [ -n "${GITHUB_REPOSITORY}" ]; then
############################################## ##############################################
# Call the status API to create status check # # Call the status API to create status check #
############################################## ##############################################
@ -1729,7 +1729,7 @@ if [ "${VALIDATE_R}" == "true" ]; then
########################## ##########################
# Check for local config # # Check for local config #
########################## ##########################
if [ ! -f "${GITHUB_WORKSPACE}/.lintr" ]; then if [ ! -f "${GITHUB_WORKSPACE}/.lintr" ]; then
info " " info " "
info "No .lintr configuration file found, using defaults." info "No .lintr configuration file found, using defaults."
cp $R_LINTER_RULES "$GITHUB_WORKSPACE" cp $R_LINTER_RULES "$GITHUB_WORKSPACE"