We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0981505 commit 49974abCopy full SHA for 49974ab
hooks/terraform_tflint.sh
@@ -50,16 +50,15 @@ function per_dir_hook_unique_part {
50
shift
51
local -a -r args=("$@")
52
53
- # Print checked PATH **only** if TFLint have any messages
54
- # shellcheck disable=SC2091,SC2068 # Suppress error output
55
- $(tflint ${args[@]} 2>&1) 2> /dev/null || {
56
- common::colorify "yellow" "TFLint in $dir_path/:"
+ TFLINT_OUTPUT=$(tflint "${args[@]}" 2>&1)
+ local exit_code=$?
57
58
- tflint "${args[@]}"
59
- }
+ if [ $exit_code -ne 0 ]; then
+ common::colorify "yellow" "TFLint in $dir_path/:"
+ echo "$TFLINT_OUTPUT"
+ fi
60
61
# return exit code to common::per_dir_hook
62
- local exit_code=$?
63
return $exit_code
64
}
65
0 commit comments