From bb6a68e80bf9b02b407dbd87599c3006d13ecd80 Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Thu, 26 May 2022 09:33:19 -0500 Subject: [PATCH] adding log level (#2959) * adding log level * Update lib/functions/detectFiles.sh Co-authored-by: Tibo Delor * fix space Co-authored-by: Tibo Delor --- lib/functions/detectFiles.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/functions/detectFiles.sh b/lib/functions/detectFiles.sh index f5a0acb6..5d43aa48 100755 --- a/lib/functions/detectFiles.sh +++ b/lib/functions/detectFiles.sh @@ -504,12 +504,17 @@ function RunAdditionalInstalls() { if [ "${VALIDATE_TERRAFORM_TFLINT}" == "true" ] && [ "${#FILE_ARRAY_TERRAFORM_TFLINT[@]}" -ne 0 ]; then info "Detected TFLint Language files to lint." info "Trying to install the TFLint init inside:[${WORKSPACE_PATH}]" + # Set the log level + TF_LOG_LEVEL="info" + if [ "${ACTIONS_RUNNER_DEBUG}" = "true" ]; then + TF_LOG_LEVEL="debug" + fi ######################### # Run the build command # ######################### BUILD_CMD=$( cd "${WORKSPACE_PATH}" || exit 0 - tflint --init 2>&1 + tflint --init --loglevel="${TF_LOG_LEVEL}" -c "${TERRAFORM_TFLINT_LINTER_RULES}" 2>&1 ) ##############