Skip to content

Commit 87143fb

Browse files
authored
fix(terraform_docs): Restore multiply --hook-config args support. Regression from v1.95.0 (antonbabenko#731)
1 parent e032273 commit 87143fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hooks/terraform_docs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ function terraform_docs {
9393
for c in "${configs[@]}"; do
9494

9595
IFS="=" read -r -a config <<< "$c"
96-
key=${config[0]}
96+
# $hook_config receives string like '--foo=bar; --baz=4;' etc.
97+
# It gets split by `;` into array, which we're parsing here ('--foo=bar' ' --baz=4')
98+
# Next line removes leading spaces, to support >1 `--hook-config` args
99+
key="${config[0]## }"
97100
value=${config[1]}
98101

99102
case $key in

0 commit comments

Comments
 (0)