fix: Suppress duplicate error messages in terraform_validate (#577)

Co-authored-by: George L. Yermulnik <yz@yz.kiev.ua>
This commit is contained in:
Maksym Vlasov 2023-10-11 14:57:15 +03:00 committed by GitHub
commit 4ea6b14c6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,7 @@ function per_dir_hook_unique_part {
# First try `terraform validate` with the hope that all deps are
# pre-installed. That is needed for cases when `.terraform/modules`
# or `.terraform/providers` missed AND that is expected.
terraform validate "${args[@]}" 2>&1 && {
terraform validate "${args[@]}" &> /dev/null && {
exit_code=$?
return $exit_code
}