File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,13 @@ function main {
14
14
common::parse_and_export_env_vars
15
15
# JFYI: terragrunt providers lock color already suppressed via PRE_COMMIT_COLOR=never
16
16
17
+ readonly RUN_ALL_SUBCOMMAND
18
+ if common::terragrunt_version_ge_0.78; then
19
+ RUN_ALL_SUBCOMMAND=(run --all providers lock)
20
+ else
21
+ RUN_ALL_SUBCOMMAND=(run-all providers lock)
22
+ fi
23
+
17
24
# shellcheck disable=SC2153 # False positive
18
25
common::per_dir_hook " $HOOK_ID " " ${# ARGS[@]} " " ${ARGS[@]} " " ${FILES[@]} "
19
26
}
@@ -63,7 +70,7 @@ function run_hook_on_whole_repo {
63
70
local -a -r args=(" $@ " )
64
71
65
72
# pass the arguments to hook
66
- terragrunt run-all providers lock " ${args[@]} "
73
+ terragrunt " ${RUN_ALL_SUBCOMMAND[@]} " " ${args[@]} "
67
74
68
75
# return exit code to common::per_dir_hook
69
76
local exit_code=$?
Original file line number Diff line number Diff line change @@ -14,6 +14,13 @@ function main {
14
14
common::parse_and_export_env_vars
15
15
# JFYI: terragrunt validate color already suppressed via PRE_COMMIT_COLOR=never
16
16
17
+ readonly RUN_ALL_SUBCOMMAND
18
+ if common::terragrunt_version_ge_0.78; then
19
+ RUN_ALL_SUBCOMMAND=(run --all validate)
20
+ else
21
+ RUN_ALL_SUBCOMMAND=(run-all validate)
22
+ fi
23
+
17
24
# shellcheck disable=SC2153 # False positive
18
25
common::per_dir_hook " $HOOK_ID " " ${# ARGS[@]} " " ${ARGS[@]} " " ${FILES[@]} "
19
26
}
@@ -63,7 +70,7 @@ function run_hook_on_whole_repo {
63
70
local -a -r args=(" $@ " )
64
71
65
72
# pass the arguments to hook
66
- terragrunt run-all validate " ${args[@]} "
73
+ terragrunt " ${RUN_ALL_SUBCOMMAND[@]} " " ${args[@]} "
67
74
68
75
# return exit code to common::per_dir_hook
69
76
local exit_code=$?
You can’t perform that action at this time.
0 commit comments