fix: execute tflint once in no errors (#250)

This commit is contained in:
Maksym Vlasov 2021-10-15 22:11:01 +03:00 committed by GitHub
commit 390a2645f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,8 +65,10 @@ tflint_() {
# Print checked PATH **only** if TFLint have any messages
# shellcheck disable=SC2091 # Suppress error output
$(tflint "${ARGS[@]}" 2>&1) ||
echo >&2 -e "\033[1;31m\nERROR in $path_uniq/:\033[0m" && tflint "${ARGS[@]}"
$(tflint "${ARGS[@]}" 2>&1) || {
echo >&2 -e "\033[1;31m\nERROR in $path_uniq/:\033[0m"
tflint "${ARGS[@]}"
}
popd > /dev/null
done