mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
fix: Add --tf-init-args, deprecate --init-args (#407)
This commit is contained in:
parent
32b232f039
commit
c4f8251d30
3 changed files with 15 additions and 13 deletions
|
|
@ -34,7 +34,7 @@ function main {
|
|||
# Globals (init and populate):
|
||||
# ARGS (array) arguments that configure wrapped tool behavior
|
||||
# HOOK_CONFIG (array) arguments that configure hook behavior
|
||||
# INIT_ARGS (array) arguments to `terraform init` command
|
||||
# TF_INIT_ARGS (array) arguments to `terraform init` command
|
||||
# ENVS (array) environment variables that will be used with
|
||||
# `terraform` commands
|
||||
# FILES (array) filenames to check
|
||||
|
|
@ -44,7 +44,7 @@ function main {
|
|||
#######################################################################
|
||||
function parse_cmdline_ {
|
||||
declare argv
|
||||
argv=$(getopt -o e:i:a: --long envs:,init-args:,args: -- "$@") || return
|
||||
argv=$(getopt -o e:i:a:h: --long envs:,tf-init-args:,init-args:,args: -- "$@") || return
|
||||
eval "set -- $argv"
|
||||
|
||||
for argv; do
|
||||
|
|
@ -59,9 +59,10 @@ function parse_cmdline_ {
|
|||
HOOK_CONFIG+=("$1;")
|
||||
shift
|
||||
;;
|
||||
-i | --init-args)
|
||||
# TODO: Planned breaking change: remove `--init-args` as not self-descriptive
|
||||
-i | --init-args | --tf-init-args)
|
||||
shift
|
||||
INIT_ARGS+=("$1")
|
||||
TF_INIT_ARGS+=("$1")
|
||||
shift
|
||||
;;
|
||||
-e | --envs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue