Skip to content

Commit a57155d

Browse files
committed
fix: format new sh file
1 parent 65aecbb commit a57155d

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

scripts/terraform_validate.sh

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@
33
set -euo pipefail
44

55
validate_terraform_directory() {
6-
local dir="$1"
7-
echo "Running \`terraform validate\` in $dir"
8-
pushd "$dir"
9-
terraform init -upgrade
10-
terraform validate
11-
popd
6+
local dir="$1"
7+
echo "Running \`terraform validate\` in $dir"
8+
pushd "$dir"
9+
terraform init -upgrade
10+
terraform validate
11+
popd
1212
}
1313

1414
main() {
15-
# Get the directory of the script
16-
local script_dir=$(dirname "$(readlink -f "$0")")
15+
# Get the directory of the script
16+
local script_dir=$(dirname "$(readlink -f "$0")")
1717

18-
# Code assumes that registry directory will always be in same position
19-
# relative to the main script directory
20-
local registry_dir="$script_dir/../registry"
18+
# Code assumes that registry directory will always be in same position
19+
# relative to the main script directory
20+
local registry_dir="$script_dir/../registry"
2121

22-
# Get all subdirectories in the registry directory. Code assumes that
23-
# Terraform directories won't begin to appear until three levels deep into
24-
# the registry (e.g., registry/coder/modules/coder-login, which will then
25-
# have a main.tf file inside it)
26-
local subdirs=$(find "$registry_dir" -mindepth 3 -type d | sort)
22+
# Get all subdirectories in the registry directory. Code assumes that
23+
# Terraform directories won't begin to appear until three levels deep into
24+
# the registry (e.g., registry/coder/modules/coder-login, which will then
25+
# have a main.tf file inside it)
26+
local subdirs=$(find "$registry_dir" -mindepth 3 -type d | sort)
2727

28-
for dir in $subdirs; do
29-
# Skip over any directories that obviously don't have the necessary
30-
# files
31-
if test -f "$dir/main.tf"; then
32-
validate_terraform_directory "$dir"
33-
fi
34-
done
28+
for dir in $subdirs; do
29+
# Skip over any directories that obviously don't have the necessary
30+
# files
31+
if test -f "$dir/main.tf"; then
32+
validate_terraform_directory "$dir"
33+
fi
34+
done
3535
}
3636

3737
main

0 commit comments

Comments
 (0)