From d7cc11f0184aaddf67ccaf72a22e9d4b486beffb Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Tue, 10 Oct 2023 14:58:44 +0300 Subject: [PATCH] fix(GH-557): Suppress duplicate error mesagges in `terraform_validate` --- hooks/terraform_validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 0ba67817d..8dddc254e 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -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 2>&1 && { exit_code=$? return $exit_code }