mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
fix: replace deprecated hclfmt with hcl format command
Replace deprecated `terragrunt hclfmt` command with the recommended `terragrunt hcl format` to eliminate deprecation warnings. Resolves warning: "The `hclfmt` command is deprecated and will be removed in a future version of Terragrunt." Signed-off-by: widnyana <wid@widnyana.web.id>
This commit is contained in:
parent
16b5e9c289
commit
f1a589bd12
1 changed files with 3 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ function main {
|
|||
common::parse_cmdline "$@"
|
||||
common::export_provided_env_vars "${ENV_VARS[@]}"
|
||||
common::parse_and_export_env_vars
|
||||
# JFYI: terragrunt hclfmt color already suppressed via PRE_COMMIT_COLOR=never
|
||||
# JFYI: terragrunt hcl format color already suppressed via PRE_COMMIT_COLOR=never
|
||||
|
||||
# shellcheck disable=SC2153 # False positive
|
||||
common::per_dir_hook "$HOOK_ID" "${#ARGS[@]}" "${ARGS[@]}" "${FILES[@]}"
|
||||
|
|
@ -40,7 +40,7 @@ function per_dir_hook_unique_part {
|
|||
local -a -r args=("$@")
|
||||
|
||||
# pass the arguments to hook
|
||||
terragrunt hclfmt "${args[@]}"
|
||||
terragrunt hcl format "${args[@]}"
|
||||
|
||||
# return exit code to common::per_dir_hook
|
||||
local exit_code=$?
|
||||
|
|
@ -57,7 +57,7 @@ function run_hook_on_whole_repo {
|
|||
local -a -r args=("$@")
|
||||
|
||||
# pass the arguments to hook
|
||||
terragrunt hclfmt "$(pwd)" "${args[@]}"
|
||||
terragrunt hcl format "$(pwd)" "${args[@]}"
|
||||
|
||||
# return exit code to common::per_dir_hook
|
||||
local exit_code=$?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue