From 54abac63b343f91a09a81fe3fc53cb2dba31d57a Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 19 Aug 2020 14:14:41 -0500 Subject: [PATCH] fix logic hole --- lib/linter.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 49269349..20c788d1 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -456,11 +456,11 @@ GetLinterVersions() { elif [[ ${LINTER} == "protolint" ]] || [[ ${LINTER} == "editorconfig-checker" ]]; then # Need specific command for Protolint and editorconfig-checker 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) mapfile -t GET_VERSION_CMD < <(R --slave -e "r_ver <- R.Version()\$version.string; \ lintr_ver <- packageVersion('lintr'); \ - glue::glue('lintr { lintr_ver } on { r_ver }')") + glue::glue('lintr { lintr_ver } on { r_ver }')") else # Standard version command mapfile -t GET_VERSION_CMD < <("${LINTER}" --version 2>&1) @@ -1004,7 +1004,7 @@ CallStatusAPI() { ########################################################## # 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 # ############################################## @@ -1729,7 +1729,7 @@ if [ "${VALIDATE_R}" == "true" ]; then ########################## # Check for local config # ########################## - if [ ! -f "${GITHUB_WORKSPACE}/.lintr" ]; then + if [ ! -f "${GITHUB_WORKSPACE}/.lintr" ]; then info " " info "No .lintr configuration file found, using defaults." cp $R_LINTER_RULES "$GITHUB_WORKSPACE"