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_() {
5858
5959 (( index += 1 ))
6060 done
61-
61+ set +e
62+ tflint_final_exit_code=0
6263 for path_uniq in $( echo " ${paths[*]} " | tr ' ' ' \n' | sort -u) ; do
6364 path_uniq=" ${path_uniq// __REPLACED__SPACE__/ } "
64- pushd " $path_uniq " > /dev/null
6565
6666 # Print checked PATH **only** if TFLint have any messages
6767 # shellcheck disable=SC2091 # Suppress error output
68- $( tflint " ${ARGS[@]} " 2>&1 ) 2> /dev/null || {
68+ $( tflint " ${ARGS[@]} " $path_uniq 2>&1 ) 2> /dev/null || {
6969 echo >&2 -e " \033[1;33m\nTFLint in $path_uniq /:\033[0m"
70- tflint " ${ARGS[@]} "
70+ tflint " ${ARGS[@]} " $path_uniq
7171 }
72-
73- popd > /dev/null
72+ local exit_code=$?
73+ if [ $exit_code != 0 ]; then
74+ tflint_final_exit_code=$exit_code
75+ fi
7476 done
77+ set -e
78+ exit $tflint_final_exit_code
7579}
7680
7781# global arrays
You can’t perform that action at this time.
0 commit comments