File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,11 @@ function per_dir_hook_unique_part {
101101 local -a -r args=(" $@ " )
102102
103103 local platforms_count=0
104+ local platforms_names=()
104105 for arg in " ${args[@]} " ; do
105106 if grep -Eq ' ^-platform=' <<< " $arg" ; then
106107 platforms_count=$(( platforms_count + 1 ))
108+ platforms_names+=(" ${arg#* =} " )
107109 fi
108110 done
109111
@@ -146,10 +148,13 @@ Check migration instructions at https://github.com/antonbabenko/pre-commit-terra
146148 }
147149 fi
148150
149- if [ " $mode " == " only-check-is-current-lockfile-cross-platform" ] &&
150- lockfile_contains_all_needed_sha " $platforms_count " ; then
151+ if [ " $mode " == " only-check-is-current-lockfile-cross-platform" ]; then
151152
152- exit 0
153+ if lockfile_contains_all_needed_sha " $platforms_count " ; then
154+ exit 0
155+ fi
156+
157+ common::colorify " yellow" " $dir_path /.terraform.lock.hcl missing some of required platforms (${platforms_names[*]} )."
153158 fi
154159
155160 # ? Don't require `tf init` for providers, but required `tf init` for modules
You can’t perform that action at this time.
0 commit comments