You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hooks/terraform_providers_lock.sh
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -157,8 +157,14 @@ Check migration instructions at https://github.com/antonbabenko/pre-commit-terra
157
157
# pass the arguments to hook
158
158
"$tf_path" providers lock "${args[@]}"
159
159
160
-
# return exit code to common::per_dir_hook
161
160
exit_code=$?
161
+
if [[ $exit_code!= 0 ]];then
162
+
common::colorify "red""$dir_path run failed. Detailed error above.
163
+
Most common issue is that you didn't run requiring 'terraform init' before running this hook. It can be run by 'terraform_validate' hook - https://github.com/antonbabenko/pre-commit-terraform#terraform_validate
0 commit comments