mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
feat: rename pre-commit-terraform to pre-commit-opentofu, pt III
This commit is contained in:
parent
2e537a9cd4
commit
233f6c6c8b
18 changed files with 103 additions and 103 deletions
|
|
@ -13,7 +13,7 @@ function main {
|
|||
common::parse_cmdline "$@"
|
||||
common::export_provided_env_vars "${ENV_VARS[@]}"
|
||||
common::parse_and_export_env_vars
|
||||
# JFYI: suppress color for `terraform providers lock` is N/A`
|
||||
# JFYI: suppress color for `tofu providers lock` is N/A`
|
||||
|
||||
# shellcheck disable=SC2153 # False positive
|
||||
common::per_dir_hook "$HOOK_ID" "${#ARGS[@]}" "${ARGS[@]}" "${FILES[@]}"
|
||||
|
|
@ -136,7 +136,7 @@ function per_dir_hook_unique_part {
|
|||
common::colorify "yellow" "DEPRECATION NOTICE: We introduced '--mode' flag for this hook.
|
||||
Check migration instructions at https://github.com/tofuutils/pre-commit-opentofu#terraform_providers_lock
|
||||
"
|
||||
common::terraform_init 'terraform providers lock' "$dir_path" || {
|
||||
common::tofu_init 'OpenTofu providers lock' "$dir_path" || {
|
||||
exit_code=$?
|
||||
return $exit_code
|
||||
}
|
||||
|
|
@ -149,9 +149,9 @@ Check migration instructions at https://github.com/tofuutils/pre-commit-opentofu
|
|||
fi
|
||||
|
||||
#? Don't require `tf init` for providers, but required `tf init` for modules
|
||||
#? Mitigated by `function match_validate_errors` from terraform_validate hook
|
||||
#? Mitigated by `function match_validate_errors` from tofu_validate hook
|
||||
# pass the arguments to hook
|
||||
terraform providers lock "${args[@]}"
|
||||
tofu providers lock "${args[@]}"
|
||||
|
||||
# return exit code to common::per_dir_hook
|
||||
exit_code=$?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue