Skip to content

Commit

Permalink
Consider MODULE.bazel for workspace detection in bazel.sh
Browse files Browse the repository at this point in the history
Fixes bazelbuild#20509.

Closes bazelbuild#20510.

PiperOrigin-RevId: 590328908
Change-Id: I5023450d7c1e23ee52e9cd7291aaf843e7365cc2
  • Loading branch information
siddharthab authored and bazel-io committed Dec 18, 2023
1 parent d798ebd commit 219eff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/packages/bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function get_realpath() {
function get_workspace_root() {
workspace_dir="${PWD}"
while [[ "${workspace_dir}" != / ]]; do
if [[ -e "${workspace_dir}/WORKSPACE" || -e "${workspace_dir}/WORKSPACE.bazel" ]]; then
if [[ -e "${workspace_dir}/WORKSPACE" || -e "${workspace_dir}/WORKSPACE.bazel" || -e "${workspace_dir}/MODULE.bazel" ]]; then
readonly workspace_dir
return
fi
Expand Down

0 comments on commit 219eff7

Please sign in to comment.