We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 337eb3a commit 3a3e525Copy full SHA for 3a3e525
1 file changed
scripts/githooks/check-terraform-docs.sh
@@ -26,8 +26,14 @@ function main() {
26
# check_only=[do not format, run check only]
27
function terraform-docs() {
28
29
+ # Skip if infrastructure/terraform/modules doesn't exist or is empty
30
+ if [ ! -d "infrastructure/terraform/modules" ] || [ -z "$(ls -A infrastructure/terraform/modules 2>/dev/null)" ]; then
31
+ echo "No Terraform modules found, skipping terraform-docs"
32
+ return 0
33
+ fi
34
+
35
make terraform-docs
- git add infrastructure/terraform/modules/**/*.md
36
+ git add infrastructure/terraform/modules/**/*.md || true
37
}
38
39
# ==============================================================================
0 commit comments