From 87143fb465503f87d5871b2d579e29b318d2bddf Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Tue, 24 Dec 2024 16:06:27 +0200 Subject: [PATCH] fix(`terraform_docs`): Restore multiply `--hook-config` args support. Regression from v1.95.0 (#731) --- hooks/terraform_docs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/terraform_docs.sh b/hooks/terraform_docs.sh index 72979dc55..3d0cc884a 100755 --- a/hooks/terraform_docs.sh +++ b/hooks/terraform_docs.sh @@ -93,7 +93,10 @@ function terraform_docs { for c in "${configs[@]}"; do IFS="=" read -r -a config <<< "$c" - key=${config[0]} + # $hook_config receives string like '--foo=bar; --baz=4;' etc. + # It gets split by `;` into array, which we're parsing here ('--foo=bar' ' --baz=4') + # Next line removes leading spaces, to support >1 `--hook-config` args + key="${config[0]## }" value=${config[1]} case $key in