We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 246348a + ba82c7f commit 0e0fb57Copy full SHA for 0e0fb57
hooks/terraform-fmt.sh
@@ -8,5 +8,7 @@ set -e
8
export PATH=$PATH:/usr/local/bin
9
10
for file in "$@"; do
11
+ pushd "$(dirname "$file")"
12
terraform fmt -write=true "$file"
13
+ popd
14
done
hooks/terraform-validate.sh
@@ -8,6 +8,8 @@ set -e
for dir in $(echo "$@" | xargs -n1 dirname | sort -u | uniq); do
- terraform init -backend=false $dir
- terraform validate $dir
+ pushd "$dir"
+ terraform init -backend=false "$dir"
+ terraform validate "$dir"
15
hooks/terragrunt-hclfmt.sh
terragrunt hclfmt --terragrunt-hclfmt-file "$file"
0 commit comments