mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
feat: Suppress color for all hooks if PRE_COMMIT_COLOR=never set (#409)
This commit is contained in:
parent
d4902313ce
commit
b12f0c662c
15 changed files with 78 additions and 11 deletions
|
|
@ -16,7 +16,7 @@ function main {
|
|||
# Support for setting PATH to repo root.
|
||||
# shellcheck disable=SC2178 # It's the simplest syntax for that case
|
||||
ARGS=${ARGS[*]/__GIT_WORKING_DIR__/$(pwd)\/}
|
||||
# shellcheck disable=SC2128 # It's the simplest syntax for that case
|
||||
# JFYI: tflint color already suppressed via PRE_COMMIT_COLOR=never
|
||||
|
||||
# Run `tflint --init` for check that plugins installed.
|
||||
# It should run once on whole repo.
|
||||
|
|
@ -30,7 +30,7 @@ function main {
|
|||
echo "${TFLINT_INIT}"
|
||||
return ${exit_code}
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2128 # It's the simplest syntax for that case
|
||||
common::per_dir_hook "$ARGS" "$HOOK_ID" "${FILES[@]}"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue