Skip to content

Commit

Permalink
fix: execute tflint once in no errors (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymVlasov authored Oct 15, 2021
1 parent 762f7b2 commit 390a264
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions terraform_tflint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 390a264

Please sign in to comment.