Skip to content

Commit

Permalink
fix: directory not empty & permission error (terraform-compliance#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
n30nx committed Mar 20, 2023
1 parent 7d2a2b5 commit c9feabe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions terraform_compliance/extensions/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ def parse(self):

for _, resource in self.resources.items():
self._expand_resource_tags(resource)

self.cache.close()

def _add_action_status(self):
'''
Expand Down
3 changes: 2 additions & 1 deletion terraform_compliance/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import shutil
import atexit
from argparse import ArgumentParser
from tempfile import mkdtemp
Expand Down Expand Up @@ -35,7 +36,7 @@ class ArgHandling(object):


def cleanup():
os.remove(Defaults().cache_file)
shutil.rmtree(Defaults().cache_dir)


def cli(arghandling=ArgHandling(), argparser=ArgumentParser(prog=__app_name__,
Expand Down

0 comments on commit c9feabe

Please sign in to comment.