Skip to content

Commit

Permalink
move terraform-docs args after markdown command (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryib authored and antonbabenko committed Jan 13, 2020
1 parent 26ab873 commit 76969ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terraform_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ terraform_docs() {
fi

if [[ "$terraform_docs_awk_file" == "0" ]]; then
terraform-docs $args md ./ > "$tmp_file"
terraform-docs md $args ./ > "$tmp_file"
else
# Can't append extension for mktemp, so renaming instead
tmp_file_docs=$(mktemp "${TMPDIR:-/tmp}/terraform-docs-XXXXXXXXXX")
mv "$tmp_file_docs" "$tmp_file_docs.tf"
tmp_file_docs_tf="$tmp_file_docs.tf"

awk -f "$terraform_docs_awk_file" ./*.tf > "$tmp_file_docs_tf"
terraform-docs $args md "$tmp_file_docs_tf" > "$tmp_file"
terraform-docs md $args "$tmp_file_docs_tf" > "$tmp_file"
rm -f "$tmp_file_docs_tf"
fi

Expand Down

0 comments on commit 76969ea

Please sign in to comment.