Skip to content

Commit

Permalink
fixing bug with clean subcommand (#1212)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandeivert committed Mar 26, 2020
1 parent f7f69e2 commit 266c5a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions streamalert_cli/manage_lambda/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
from streamalert_cli.helpers import run_command
from streamalert_cli.terraform import TERRAFORM_FILES_PATH

# Build .zip files in the top-level of the terraform directory
THIS_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
LOGGER = get_logger(__name__)


Expand Down Expand Up @@ -84,6 +82,7 @@ def create(self):
sys.exit(1)

# Zip up files
# Build these in the top-level of the terraform directory
result = shutil.make_archive(
os.path.join(TERRAFORM_FILES_PATH, self.package_name), 'zip', temp_package_path)
LOGGER.info('Successfully created %s', os.path.basename(result))
Expand Down
2 changes: 1 addition & 1 deletion streamalert_cli/terraform/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _rm_file(path):
print('Removing terraform file: {}'.format(path))
os.remove(path)

for root, _, files in os.walk('terraform'):
for root, _, files in os.walk(TERRAFORM_FILES_PATH):
for file_name in files:
path = os.path.join(root, file_name)
if path.endswith('.tf.json'):
Expand Down

0 comments on commit 266c5a5

Please sign in to comment.