diff --git a/script.sh b/script.sh index 34f1be6..8463eef 100755 --- a/script.sh +++ b/script.sh @@ -88,9 +88,11 @@ if [[ "${INPUT_REPORTER}" == "github-pr-review" ]]; then fi # Throw error if an error occurred and fail_on_error is true -if [[ "${INPUT_FAIL_ON_ERROR}" == "true" \ - && ( "${textlint_exit_val}" != "0" \ - || "${reviewdog_exit_val}" != "0" ) \ +# textlint exitcode: 0 success 1 lint error detect 2 fatal error +if [[ "${INPUT_FAIL_ON_ERROR}" == "true" \ + && (( "${textlint_exit_val}" != "0" \ + || "${textlint_exit_val}" != "1" ) \ + || "${reviewdog_exit_val}" != "0" ) \ ]]; then exit 1 fi