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_() {
61
61
62
62
for path_uniq in $( echo " ${paths[*]} " | tr ' ' ' \n' | sort -u) ; do
63
63
path_uniq=" ${path_uniq// __REPLACED__SPACE__/ } "
64
-
65
64
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
- )
71
65
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[@]} "
77
70
78
71
popd > /dev/null
79
72
done
You can’t perform that action at this time.
0 commit comments