8000 adding log level (#2959) · github/super-linter@bb6a68e · GitHub
[go: up one dir, main page]

Skip to content

Commit bb6a68e

Browse files
adding log level (super-linter#2959)
* adding log level * Update lib/functions/detectFiles.sh Co-authored-by: Tibo Delor <delor.thibault@gmail.com> * fix space Co-authored-by: Tibo Delor <delor.thibault@gmail.com>
1 parent ec06627 commit bb6a68e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/functions/detectFiles.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,12 +504,17 @@ function RunAdditionalInstalls() {
504504
if [ "${VALIDATE_TERRAFORM_TFLINT}" == "true" ] && [ "${#FILE_ARRAY_TERRAFORM_TFLINT[@]}" -ne 0 ]; then
505505
info "Detected TFLint Language files to lint."
506506
info "Trying to install the TFLint init inside:[${WORKSPACE_PATH}]"
507+
# Set the log level
508+
TF_LOG_LEVEL="info"
509+
if [ "${ACTIONS_RUNNER_DEBUG}" = "true" ]; then
510+
TF_LOG_LEVEL="debug"
511+
fi
507512
#########################
508513
# Run the build command #
509514
#########################
510515
BUILD_CMD=$(
511516
cd "${WORKSPACE_PATH}" || exit 0
512-
tflint --init 2>&1
517+
tflint --init --loglevel="${TF_LOG_LEVEL}" -c "${TERRAFORM_TFLINT_LINTER_RULES}" 2>&1
513518
)
514519

515520
##############

0 commit comments

Comments
 (0)
0