File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -61,19 +61,12 @@ tflint_() {
6161
6262 for path_uniq in $( echo " ${paths[*]} " | tr ' ' ' \n' | sort -u) ; do
6363 path_uniq=" ${path_uniq// __REPLACED__SPACE__/ } "
64-
6564 pushd " $path_uniq " > /dev/null
66- TFLINT_MSG=$(
67- tflint " ${ARGS[@]} " 2>&1 ||
68- echo >&2 -e " \033[1;31m\nERROR in ./$path_uniq /:\033[0m" &&
69- tflint " ${ARGS[@]} " # Print TFLint error with PATH
70- )
7165
72- # Print checked PATH if TFLint have any messages
73- if [ ! -z " $TFLINT_MSG " ]; then
74- echo -e " \n./$path_uniq /:"
75- echo " $TFLINT_MSG "
76- fi
66+ # Print checked PATH **only** if TFLint have any messages
67+ # shellcheck disable=SC2091 # Suppress error output
68+ $( tflint " ${ARGS[@]} " 2>&1 ) ||
69+ echo >&2 -e " \033[1;31m\nERROR in $path_uniq /:\033[0m" && tflint " ${ARGS[@]} "
7770
7871 popd > /dev/null
7972 done
You can’t perform that action at this time.
0 commit comments