Skip to content

Commit 3cdf8ec

Browse files
authored
Merge pull request #30 from RothAndrew/feature/fix_issue_29
Fix bug not letting terraform_docs_replace work in the root directory…
2 parents a52b507 + 15c9f39 commit 3cdf8ec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pre_commit_hooks/terraform_docs_replace.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def main(argv=None):
2525
dirs = []
2626
for filename in args.filenames:
2727
if (os.path.realpath(filename) not in dirs and \
28-
len(os.path.realpath(filename).strip()) > 0 and \
2928
(filename.endswith(".tf") or filename.endswith(".tfvars"))):
3029
dirs.append(os.path.dirname(filename))
3130

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

0 commit comments

Comments
 (0)