File tree Expand file tree Collapse file tree 1 file changed +17
-16
lines changed
Expand file tree Collapse file tree 1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -169,26 +169,27 @@ Check migration instructions at https://github.com/antonbabenko/pre-commit-terra
169169 }
170170 fi
171171
172- if [ " $mode " == " check-lockfile-is-cross-platform " ] ; then
173-
174- if lockfile_contains_all_needed_sha " $platforms_count " ; then
175- exit 0
176- fi
172+ case " $mode " in
173+ " check-lockfile-is-cross-platform " )
174+ if lockfile_contains_all_needed_sha " $platforms_count " ; then
175+ exit 0
176+ fi
177177
178- common::colorify " red" " \n$dir_path /.terraform.lock.hcl missing some of required platforms.
179- All required platforms: ${platforms_names[*]} ."
180- exit 1
181- fi
178+ common::colorify " red" " $dir_path /.terraform.lock.hcl missing some of required platforms.
179+ All required platforms: ${platforms_names[*]} "
182180
183- if [ " $mode " == " regenerate-lockfile-if-some-platform-missed" ]; then
181+ exit 1
182+ ;;
183+ " regenerate-lockfile-if-some-platform-missed" )
184+ if lockfile_contains_all_needed_sha " $platforms_count " ; then
185+ exit 0
186+ fi
184187
185- if lockfile_contains_all_needed_sha " $platforms_count " ; then
186- exit 0
187- fi
188+ common::colorify " yellow" " $dir_path /.terraform.lock.hcl missing some of required platforms.
189+ All required platforms: ${platforms_names[*]} \n"
188190
189- common::colorify " yellow" " $dir_path /.terraform.lock.hcl missing some of required platforms.
190- All required platforms: ${platforms_names[*]} .\n"
191- fi
191+ ;;
192+ esac
192193
193194 # ? Don't require `tf init` for providers, but required `tf init` for modules
194195 # ? Mitigated by `function match_validate_errors` from terraform_validate hook
You can’t perform that action at this time.
0 commit comments