Skip to content

Commit

Permalink
fixing bug with clean subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandeivert committed Mar 26, 2020
1 parent 530a154 commit c4944bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions streamalert_cli/manage_lambda/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +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__))
BUILD_DIRECTORY = os.path.join(THIS_DIRECTORY, '..', '..', 'terraform')
LOGGER = get_logger(__name__)


Expand Down Expand Up @@ -85,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 c4944bf

Please sign in to comment.