Skip to content

Commit

Permalink
Merge pull request #1584 from jmishra01/avoid_multiple_check
Browse files Browse the repository at this point in the history
fix: Avoid continue loop in is_bench_directory
  • Loading branch information
gavindsouza authored Oct 24, 2024
2 parents bb2e324 + 877bf09 commit af8ed34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bench/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def is_bench_directory(directory=os.path.curdir):
for folder in paths_in_bench:
path = os.path.abspath(os.path.join(directory, folder))
is_bench = is_bench and os.path.exists(path)
# Once is_bench becomes false, it will always be false, even if other path exists.
if not is_bench:
break

return is_bench

Expand Down

0 comments on commit af8ed34

Please sign in to comment.