File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -536,13 +536,13 @@ function common::terraform_init {
536536 # Plugin cache dir can't be written concurrently or read during write
537537 # https://github.com/hashicorp/terraform/issues/31964
538538 if [[ -z $TF_PLUGIN_CACHE_DIR || $parallelism_disabled == true ]]; then
539- init_output=$( $tf_path init -backend=false " ${TF_INIT_ARGS[@]} " 2>&1 )
539+ init_output=$( " $tf_path " init -backend=false " ${TF_INIT_ARGS[@]} " 2>&1 )
540540 exit_code=$?
541541 else
542542 # Locking just doesn't work, and the below works quicker instead. Details:
543543 # https://github.com/hashicorp/terraform/issues/31964#issuecomment-1939869453
544544 for i in {1..10}; do
545- init_output=$( $tf_path init -backend=false " ${TF_INIT_ARGS[@]} " 2>&1 )
545+ init_output=$( " $tf_path " init -backend=false " ${TF_INIT_ARGS[@]} " 2>&1 )
546546 exit_code=$?
547547
548548 if [ $exit_code -eq 0 ]; then
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function per_dir_hook_unique_part {
4949 local -a -r args=(" $@ " )
5050
5151 # pass the arguments to hook
52- $tf_path fmt " ${args[@]} "
52+ " $tf_path " fmt " ${args[@]} "
5353
5454 # return exit code to common::per_dir_hook
5555 local exit_code=$?
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ function per_dir_hook_unique_part {
140140 common::colorify " yellow" " DEPRECATION NOTICE: We introduced '--mode' flag for this hook.
141141Check migration instructions at https://github.com/antonbabenko/pre-commit-terraform#terraform_providers_lock
142142"
143- common::terraform_init ' terraform providers lock' " $dir_path " " $parallelism_disabled " " $tf_path " || {
143+ common::terraform_init " $tf_path providers lock" " $dir_path " " $parallelism_disabled " " $tf_path " || {
144144 exit_code=$?
145145 return $exit_code
146146 }
@@ -155,7 +155,7 @@ Check migration instructions at https://github.com/antonbabenko/pre-commit-terra
155155 # ? Don't require `tf init` for providers, but required `tf init` for modules
156156 # ? Mitigated by `function match_validate_errors` from terraform_validate hook
157157 # pass the arguments to hook
158- $tf_path providers lock " ${args[@]} "
158+ " $tf_path " providers lock " ${args[@]} "
159159
160160 # return exit code to common::per_dir_hook
161161 exit_code=$?
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ function per_dir_hook_unique_part {
118118 # First try `terraform validate` with the hope that all deps are
119119 # pre-installed. That is needed for cases when `.terraform/modules`
120120 # or `.terraform/providers` missed AND that is expected.
121- $tf_path validate " ${args[@]} " & > /dev/null && {
121+ " $tf_path " validate " ${args[@]} " & > /dev/null && {
122122 exit_code=$?
123123 return $exit_code
124124 }
@@ -132,11 +132,11 @@ function per_dir_hook_unique_part {
132132
133133 if [ " $retry_once_with_cleanup " != " true" ]; then
134134 # terraform validate only
135- validate_output=$( $tf_path validate " ${args[@]} " 2>&1 )
135+ validate_output=$( " $tf_path " validate " ${args[@]} " 2>&1 )
136136 exit_code=$?
137137 else
138138 # terraform validate, plus capture possible errors
139- validate_output=$( $tf_path validate -json " ${args[@]} " 2>&1 )
139+ validate_output=$( " $tf_path " validate -json " ${args[@]} " 2>&1 )
140140 exit_code=$?
141141
142142 # Match specific validation errors
@@ -159,7 +159,7 @@ function per_dir_hook_unique_part {
159159 return $exit_code
160160 }
161161
162- validate_output=$( $tf_path validate " ${args[@]} " 2>&1 )
162+ validate_output=$( " $tf_path " validate " ${args[@]} " 2>&1 )
163163 exit_code=$?
164164 fi
165165 fi
You can’t perform that action at this time.
0 commit comments