Skip to content

Commit 1a2cf36

Browse files
committed
Pet shellcheck
1 parent b0573e7 commit 1a2cf36

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hooks/terraform_docs.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ function terraform_docs {
241241
[[ ! $have_marker ]] && popd > /dev/null && continue
242242
fi
243243

244+
# shellcheck disable=SC2206
245+
# Need to pass $tf_docs_formatter and $args as separate arguments, not as single string
244246
local tfdocs_cmd=(
245247
terraform-docs
246248
--output-mode="$output_mode"
@@ -249,9 +251,9 @@ function terraform_docs {
249251
$args
250252
)
251253
if [[ $have_config_flag == true ]]; then
252-
${tfdocs_cmd[@]} "--config=$config_file" ./ > /dev/null
254+
"${tfdocs_cmd[@]}" "--config=$config_file" ./ > /dev/null
253255
else
254-
${tfdocs_cmd[@]} ./ > /dev/null
256+
"${tfdocs_cmd[@]}" ./ > /dev/null
255257
fi
256258

257259
popd > /dev/null

0 commit comments

Comments
 (0)