1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Apply regex to dir name only (#35744)

This commit is contained in:
Chris Houseknecht 2018-02-06 16:39:57 -05:00 committed by GitHub
parent 1d068d4af9
commit c20beeef37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -233,7 +233,7 @@ class GalaxyCLI(CLI):
for root, dirs, files in os.walk(role_skeleton, topdown=True):
rel_root = os.path.relpath(root, role_skeleton)
in_templates_dir = rel_root.split(os.sep, 1)[0] == 'templates'
dirs[:] = [d for d in dirs if not any(r.match(os.path.join(rel_root, d)) for r in skeleton_ignore_re)]
dirs[:] = [d for d in dirs if not any(r.match(d) for r in skeleton_ignore_re)]
for f in files:
filename, ext = os.path.splitext(f)