File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -58,20 +58,24 @@ tflint_() {
58
58
59
59
(( index += 1 ))
60
60
done
61
-
61
+ set +e
62
+ tflint_final_exit_code=0
62
63
for path_uniq in $( echo " ${paths[*]} " | tr ' ' ' \n' | sort -u) ; do
63
64
path_uniq=" ${path_uniq// __REPLACED__SPACE__/ } "
64
- pushd " $path_uniq " > /dev/null
65
65
66
66
# Print checked PATH **only** if TFLint have any messages
67
67
# shellcheck disable=SC2091 # Suppress error output
68
- $( tflint " ${ARGS[@]} " 2>&1 ) 2> /dev/null || {
68
+ $( tflint " ${ARGS[@]} " $path_uniq 2>&1 ) 2> /dev/null || {
69
69
echo >&2 -e " \033[1;33m\nTFLint in $path_uniq /:\033[0m"
70
- tflint " ${ARGS[@]} "
70
+ tflint " ${ARGS[@]} " $path_uniq
71
71
}
72
-
73
- popd > /dev/null
72
+ local exit_code=$?
73
+ if [ $exit_code != 0 ]; then
74
+ tflint_final_exit_code=$exit_code
75
+ fi
74
76
done
77
+ set -e
78
+ exit $tflint_final_exit_code
75
79
}
76
80
77
81
# global arrays
You can’t perform that action at this time.
0 commit comments