Skip to content

Commit 3ab2f85

Browse files
gekyadbridge
authored andcommitted
Fix behaviour of empty .mbedignore
Should ignore nothing, currently ignores everything An empty .mbedignore is easy to create when tinkering with a local repo
1 parent fceea7a commit 3ab2f85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/toolchains/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,8 @@ def add_ignore_patterns(self, root, base_path, patterns):
615615
self.ignore_patterns.extend(normcase(p) for p in patterns)
616616
else:
617617
self.ignore_patterns.extend(normcase(join(real_base, pat)) for pat in patterns)
618-
self._ignore_regex = re.compile("|".join(fnmatch.translate(p) for p in self.ignore_patterns))
618+
if self.ignore_patterns:
619+
self._ignore_regex = re.compile("|".join(fnmatch.translate(p) for p in self.ignore_patterns))
619620

620621
# Create a Resources object from the path pointed to by *path* by either traversing a
621622
# a directory structure, when *path* is a directory, or adding *path* to the resources,

0 commit comments

Comments
 (0)