diff --git a/lib/functions/detectFiles.sh b/lib/functions/detectFiles.sh index f5a0acb6072..5d43aa4860f 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 ) ##############