mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-22 12:42:09 -05:00
adding addional command (#2711)
* adding addional command * shell format
This commit is contained in:
parent
b9e625588a
commit
14eb37a88c
1 changed files with 31 additions and 0 deletions
|
@ -497,4 +497,35 @@ function RunAdditionalInstalls() {
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
####################################
|
||||
# Run installs for TFLINT language #
|
||||
####################################
|
||||
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}]"
|
||||
#########################
|
||||
# Run the build command #
|
||||
#########################
|
||||
BUILD_CMD=$(
|
||||
cd "${WORKSPACE_PATH}" || exit 0
|
||||
tflint --init 2>&1
|
||||
)
|
||||
|
||||
##############
|
||||
# Error code #
|
||||
##############
|
||||
ERROR_CODE=$?
|
||||
|
||||
##############################
|
||||
# Check the shell for errors #
|
||||
##############################
|
||||
if [ "${ERROR_CODE}" -ne 0 ]; then
|
||||
# Error
|
||||
warn "ERROR! Failed to run:[tflint --init] at location:[${WORKSPACE_PATH}]"
|
||||
warn "BUILD_CMD:[${BUILD_CMD}]"
|
||||
else
|
||||
info "Successfully ran:[tflint --init] in workspace:[${WORKSPACE_PATH}]"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue