From e11506feaea7401c3d27f55b47183ef49bd1d5a8 Mon Sep 17 00:00:00 2001 From: Siddhartha Bagaria Date: Tue, 12 Dec 2023 14:03:30 -0800 Subject: [PATCH] Consider MODULE.bazel for workspace detection in bazel.sh Fixes #20509. Closes #20510. PiperOrigin-RevId: 590328908 Change-Id: I5023450d7c1e23ee52e9cd7291aaf843e7365cc2 --- scripts/packages/bazel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/packages/bazel.sh b/scripts/packages/bazel.sh index c971ebc6971daa..5130cb14dc52cb 100755 --- a/scripts/packages/bazel.sh +++ b/scripts/packages/bazel.sh @@ -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