From d9f482c0c6fa0bd464bbaa7444b4f853f1bc4fb9 Mon Sep 17 00:00:00 2001 From: Nicholas Henry Date: Tue, 21 Jun 2022 14:59:41 -0600 Subject: [PATCH] fix: Pre-commit-terraform terraform_validate hook (#401) --- 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 11e076e1e..2f77b16c7 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -111,7 +111,7 @@ function terraform_validate_ { if [[ -n "$(find "$dir_path" -maxdepth 1 -name '*.tf' -print -quit)" ]]; then - pushd "$(cd "$dir_path" && pwd -P)" > /dev/null + pushd "$(cd "$dir_path" > /dev/null && pwd -P)" > /dev/null if [ ! -d .terraform ]; then set +e