File tree Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,11 @@ function main {
14
14
common::parse_and_export_env_vars
15
15
# JFYI: `terragrunt hcl format` color already suppressed via PRE_COMMIT_COLOR=never
16
16
17
- readonly SUBCOMMAND
18
- common::terragrunt_version_ge_0.78 && SUBCOMMAND=(hcl format) || SUBCOMMAND=(hclfmt)
17
+ if common::terragrunt_version_ge_0.78; then
18
+ local -ra SUBCOMMAND=(hcl format)
19
+ else
20
+ local -ra SUBCOMMAND=(hclfmt)
21
+ fi
19
22
20
23
# shellcheck disable=SC2153 # False positive
21
24
common::per_dir_hook " $HOOK_ID " " ${# ARGS[@]} " " ${ARGS[@]} " " ${FILES[@]} "
Original file line number Diff line number Diff line change @@ -14,11 +14,10 @@ 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
17
if common::terragrunt_version_ge_0.78; then
19
- RUN_ALL_SUBCOMMAND=(run --all providers lock)
18
+ local -ra RUN_ALL_SUBCOMMAND=(run --all providers lock)
20
19
else
21
- RUN_ALL_SUBCOMMAND=(run-all providers lock)
20
+ local -ra RUN_ALL_SUBCOMMAND=(run-all providers lock)
22
21
fi
23
22
24
23
# shellcheck disable=SC2153 # False positive
Original file line number Diff line number Diff line change @@ -14,11 +14,10 @@ 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
17
if common::terragrunt_version_ge_0.78; then
19
- RUN_ALL_SUBCOMMAND=(run --all validate)
18
+ local -ra RUN_ALL_SUBCOMMAND=(run --all validate)
20
19
else
21
- RUN_ALL_SUBCOMMAND=(run-all validate)
20
+ local -ra RUN_ALL_SUBCOMMAND=(run-all validate)
22
21
fi
23
22
24
23
# shellcheck disable=SC2153 # False positive
Original file line number Diff line number Diff line change @@ -14,14 +14,12 @@ 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 SUBCOMMAND
18
- readonly RUN_ALL_SUBCOMMAND
19
17
if common::terragrunt_version_ge_0.78; then
20
- SUBCOMMAND=(hcl validate --inputs)
21
- RUN_ALL_SUBCOMMAND=(run --all hcl validate --inputs)
18
+ local -ra SUBCOMMAND=(hcl validate --inputs)
19
+ local -ra RUN_ALL_SUBCOMMAND=(run --all hcl validate --inputs)
22
20
else
23
- SUBCOMMAND=(validate-inputs)
24
- RUN_ALL_SUBCOMMAND=(run-all validate-inputs)
21
+ local -ra SUBCOMMAND=(validate-inputs)
22
+ local -ra RUN_ALL_SUBCOMMAND=(run-all validate-inputs)
25
23
fi
26
24
27
25
# shellcheck disable=SC2153 # False positive
You can’t perform that action at this time.
0 commit comments