adding log level (#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>
This commit is contained in:
Lukas Gravley 2022-05-26 09:33:19 -05:00 committed by GitHub
parent ec0662756d
commit bb6a68e80b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -504,12 +504,17 @@ function RunAdditionalInstalls() {
if [ "${VALIDATE_TERRAFORM_TFLINT}" == "true" ] && [ "${#FILE_ARRAY_TERRAFORM_TFLINT[@]}" -ne 0 ]; then if [ "${VALIDATE_TERRAFORM_TFLINT}" == "true" ] && [ "${#FILE_ARRAY_TERRAFORM_TFLINT[@]}" -ne 0 ]; then
info "Detected TFLint Language files to lint." info "Detected TFLint Language files to lint."
info "Trying to install the TFLint init inside:[${WORKSPACE_PATH}]" 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 # # Run the build command #
######################### #########################
BUILD_CMD=$( BUILD_CMD=$(
cd "${WORKSPACE_PATH}" || exit 0 cd "${WORKSPACE_PATH}" || exit 0
tflint --init 2>&1 tflint --init --loglevel="${TF_LOG_LEVEL}" -c "${TERRAFORM_TFLINT_LINTER_RULES}" 2>&1
) )
############## ##############