mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
Fix bug not letting terraform_docs_replace work in the root directory of a repo
This commit is contained in:
parent
a52b507a18
commit
15c9f394d3
1 changed files with 1 additions and 2 deletions
|
|
@ -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))
|
||||
|
||||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue