We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3adde17 commit 1cbab1eCopy full SHA for 1cbab1e
hooks/terraform_docs.sh
@@ -145,8 +145,13 @@ function terraform_docs {
145
had_config_flag=true
146
local config_file=${args#*--config}
147
config_file=${config_file#*=}
148
- config_file=${config_file% --*}
149
- args=${args/--config=$config_file/}
+ # If there are more parameters after config path, trim until --
+ if [[ $config_file == *" --"* ]]; then
150
+ config_file=${config_file%% --*}
151
+ fi
152
+ # Trim trailing whitespace but preserve internal spaces
153
+
154
+ config_file="${config_file%"${config_file##*[![:space:]]}"}" args=${args/--config=$config_file/}
155
156
# Prioritize `.terraform-docs.yml` `output.file` over
157
# `--hook-config=--path-to-file=` if it set
0 commit comments