Skip to content

Commit

Permalink
Allow to recursively search package
Browse files Browse the repository at this point in the history
  • Loading branch information
mcoconnor committed Aug 23, 2023
1 parent f2f03ba commit ddd6b65
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zappa/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,9 @@ def splitpath(path):
else:
copytree(cwd, temp_project_path, metadata=False, symlinks=False)
for glob_path in exclude_glob:
for path in glob.glob(os.path.join(temp_project_path, glob_path)):
# Use `recursive` to match paths deep in the directory tree
# https://github.com/zappa/Zappa/issues/1269
for path in glob.glob(os.path.join(temp_project_path, glob_path), recursive=True):
try:
os.remove(path)
except OSError: # is a directory
Expand Down Expand Up @@ -767,7 +769,9 @@ def splitpath(path):

# Cleanup
for glob_path in exclude_glob:
for path in glob.glob(os.path.join(temp_project_path, glob_path)):
# Use `recursive` to match paths deep in the directory tree
# https://github.com/zappa/Zappa/issues/1269
for path in glob.glob(os.path.join(temp_project_path, glob_path), recursive=True):
try:
os.remove(path)
except OSError: # is a directory
Expand Down

0 comments on commit ddd6b65

Please sign in to comment.