Skip to content

Commit feabecc

Browse files
authored
fix: typo in arg name for terraform-docs (antonbabenko#283)
1 parent af10d4f commit feabecc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ Unlike most other hooks, this hook triggers once if there are any changed files
329329
- id: terraform_docs
330330
args:
331331
- --hook-config=--path-to-file=README.md # Valid UNIX path. I.e. ../TFDOC.md or docs/README.md etc.
332-
- --hook-config=--add-to-exiting-file=true # Boolean. true or false
332+
- --hook-config=--add-to-existing-file=true # Boolean. true or false
333333
- --hook-config=--create-file-if-not-exist=true # Boolean. true or false
334334
```
335335

terraform_docs.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ terraform_docs() {
119119
# Get hook settings
120120
#
121121
local text_file="README.md"
122-
local add_to_exiting=false
122+
local add_to_existing=false
123123
local create_if_not_exist=false
124124

125125
configs=($hook_config)
@@ -132,8 +132,8 @@ terraform_docs() {
132132
--path-to-file)
133133
text_file=$value
134134
;;
135-
--add-to-exiting-file)
136-
add_to_exiting=$value
135+
--add-to-existing-file)
136+
add_to_existing=$value
137137
;;
138138
--create-file-if-not-exist)
139139
create_if_not_exist=$value
@@ -171,10 +171,10 @@ terraform_docs() {
171171
[[ ! -f "$text_file" ]] && popd > /dev/null && continue
172172

173173
#
174-
# If `--add-to-exiting-file=true` set, check is in file exist "hook markers",
174+
# If `--add-to-existing-file=true` set, check is in file exist "hook markers",
175175
# and if not - append "hook markers" to the end of file.
176176
#
177-
if $add_to_exiting; then
177+
if $add_to_existing; then
178178
HAVE_MARKER=$(grep -o '<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->' "$text_file" || exit 0)
179179

180180
if [ ! "$HAVE_MARKER" ]; then

0 commit comments

Comments
 (0)