Skip to content

Commit

Permalink
bazelisk.py notices WORKSPACE.bazel as a workspace_root (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri authored May 16, 2023
1 parent 86a4366 commit 70e3e87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bazelisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def find_workspace_root(root=None):
root = os.getcwd()
if os.path.exists(os.path.join(root, "WORKSPACE")):
return root
if os.path.exists(os.path.join(root, "WORKSPACE.bazel")):
return root
new_root = os.path.dirname(root)
return find_workspace_root(new_root) if new_root != root else None

Expand Down

0 comments on commit 70e3e87

Please sign in to comment.