Skip to content

Commit 2bba75c

Browse files
committed
Address Coderabbit suggestion and make messages more consistent
1 parent 1ccfcb2 commit 2bba75c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hooks/terraform_providers_lock.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,19 @@ function per_dir_hook_unique_part {
126126
case "$key" in
127127
--mode)
128128
if [ "$mode" ]; then
129-
common::colorify "yellow" 'Invalid hook config. Make sure that you specify not more than one "--mode" flag'
129+
common::colorify "yellow" 'Invalid hook config. Make sure that you specify not more than one "--mode" flag.'
130130
exit 1
131131
fi
132132
mode=$value
133133

134-
case $mode in
134+
case "$mode" in
135135
check-lockfile-is-cross-platform) ;;
136136
regenerate-lockfile-if-some-platform-missed) ;;
137137
always-regenerate-lockfile) ;;
138138

139139
only-check-is-current-lockfile-cross-platform)
140-
common::colorify "yellow" "DEPRECATION NOTICE: Flag '--mode=only-check-is-current-lockfile-cross-platform' was renamed
141-
to '--mode=regenerate-lockfile-if-some-platform-missed' to better reflect its behavior. Please update your configuration.
140+
common::colorify "yellow" "DEPRECATION NOTICE: Flag '--mode=only-check-is-current-lockfile-cross-platform' was renamed to '--mode=regenerate-lockfile-if-some-platform-missed' to better reflect its behavior.
141+
Please update your configuration.
142142
"
143143
mode="regenerate-lockfile-if-some-platform-missed"
144144
;;
@@ -201,7 +201,7 @@ All required platforms: ${platforms_names[*]}
201201
exit_code=$?
202202
if [[ $exit_code -ne 0 ]]; then
203203
common::colorify "red" "$dir_path run failed. Detailed error above.
204-
Most common issue is that required 'terraform init' command was likely not run before running this hook. It might be run for you automatically by 'terraform_validate' hook - see https://github.com/antonbabenko/pre-commit-terraform#terraform_validate for more details
204+
Most common issue is that required 'terraform init' command was likely not run before running this hook. It might be run for you automatically by 'terraform_validate' hook - see https://github.com/antonbabenko/pre-commit-terraform#terraform_validate for more details.
205205
"
206206
fi
207207

0 commit comments

Comments
 (0)