third_party/nix: fix bazel not detecting workspace root when bzlmod only
Change-Id: Iaf9e20a12764b9f1dd1869b3e73068261c7ca43f
Reviewed-on: https://review.monogon.dev/c/monogon/+/4027
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/third_party/nix/bazel-inner.sh b/third_party/nix/bazel-inner.sh
index 1fdfd38..7b978bc 100755
--- a/third_party/nix/bazel-inner.sh
+++ b/third_party/nix/bazel-inner.sh
@@ -2,7 +2,7 @@
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