Skip to content

Commit 6a06600

Browse files
committed
Fix tf-docs creating new readmes
1 parent 1875744 commit 6a06600

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/tf-docs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ fi
1313

1414
echo "Running $(basename "${0}") pre-commit checks..."
1515
for FILE in "${@}"; do
16-
terraform-docs markdown "$(dirname "${FILE}")" >/dev/null
16+
DIR=$(dirname "${FILE}")
17+
if [ -e "${DIR}/README.md" ]; then
18+
terraform-docs markdown "$(dirname "${FILE}")" >/dev/null
19+
fi
1720
done

0 commit comments

Comments
 (0)