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