Skip to content

Commit 5e5e547

Browse files
authored
chore: improve path comparison in build dir detection (#123)
Signed-off-by: behnazh-w <[email protected]>
1 parent f685439 commit 5e5e547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/macaron/slsa_analyzer/build_tool/base_build_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_build_dirs(self, repo_path: str) -> Iterable[Path]:
155155
cfg_path = next(list_iter)
156156
yield Path(cfg_path).parent.relative_to(repo_path)
157157
while next_item := next(list_iter):
158-
if str(Path(cfg_path).parent) in next_item:
158+
if next_item.startswith(str(Path(cfg_path).parent)):
159159
continue
160160
cfg_path = next_item
161161
yield Path(next_item).parent.relative_to(repo_path)

0 commit comments

Comments
 (0)