File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ function main {
1515 # JFYI: terragrunt providers lock color already suppressed via PRE_COMMIT_COLOR=never
1616
1717 if common::terragrunt_version_ge_0.78; then
18+ local -ra SUBCOMMAND=(run -- providers lock)
1819 local -ra RUN_ALL_SUBCOMMAND=(run --all -- providers lock)
1920 else
21+ local -ra SUBCOMMAND=(providers lock)
2022 local -ra RUN_ALL_SUBCOMMAND=(run-all providers lock)
2123 fi
2224
@@ -52,7 +54,7 @@ function per_dir_hook_unique_part {
5254 local -a -r args=(" $@ " )
5355
5456 # pass the arguments to hook
55- terragrunt providers lock " ${args[@]} "
57+ terragrunt " ${SUBCOMMAND[@]} " " ${args[@]} "
5658
5759 # return exit code to common::per_dir_hook
5860 local exit_code=$?
Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ function main {
1515 # JFYI: terragrunt validate color already suppressed via PRE_COMMIT_COLOR=never
1616
1717 if common::terragrunt_version_ge_0.78; then
18+ local -ra SUBCOMMAND=(run -- validate)
1819 local -ra RUN_ALL_SUBCOMMAND=(run --all -- validate)
1920 else
21+ local -ra SUBCOMMAND=(validate)
2022 local -ra RUN_ALL_SUBCOMMAND=(run-all validate)
2123 fi
2224
@@ -52,7 +54,7 @@ function per_dir_hook_unique_part {
5254 local -a -r args=(" $@ " )
5355
5456 # pass the arguments to hook
55- terragrunt validate " ${args[@]} "
57+ terragrunt " ${SUBCOMMAND[@]} " " ${args[@]} "
5658
5759 # return exit code to common::per_dir_hook
5860 local exit_code=$?
You can’t perform that action at this time.
0 commit comments