Skip to content

Commit

Permalink
Merge pull request #30 from RothAndrew/feature/fix_issue_29
Browse files Browse the repository at this point in the history
Fix bug not letting terraform_docs_replace work in the root directory…
  • Loading branch information
antonbabenko authored Dec 15, 2018
2 parents a52b507 + 15c9f39 commit 3cdf8ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pre_commit_hooks/terraform_docs_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def main(argv=None):
dirs = []
for filename in args.filenames:
if (os.path.realpath(filename) not in dirs and \
len(os.path.realpath(filename).strip()) > 0 and \
(filename.endswith(".tf") or filename.endswith(".tfvars"))):
dirs.append(os.path.dirname(filename))

Expand All @@ -40,7 +39,7 @@ def main(argv=None):
if args.aggregate:
procArgs.append('--with-aggregate-type-defaults')
procArgs.append('md')
procArgs.append(dir)
procArgs.append("./{dir}".format(dir=dir))
procArgs.append("| sed -e '$ d' -e 'N;/^\\n$/D;P;D'")
procArgs.append('>')
procArgs.append("./{dir}/{dest}".format(dir=dir,dest=args.dest))
Expand Down

0 comments on commit 3cdf8ec

Please sign in to comment.