.bazelrc next to the Bazel binary is ignored
Description of the problem:
The guide mentions that bazel looks for a .bazelrc file next to its binary, but this seems to have been disabled long ago:
In addition to your personal .bazelrc file, Bazel reads global bazelrc files in this order: $workspace/tools/bazel.rc, .bazelrc next to the Bazel binary, and /etc/bazel.bazelrc. (It's fine if any are missing.)
Which is a shame, because I actually wanted to use that feature to provide offline build machines with bazel+distdir packages.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Copy bazel release as C:\Users\me\mybazel\bazel.exe
- Create an invalid
C:\Users\me\mybazel\bazel.bazelrcfile next to the binary, e.g:common --not-a-flag - Run
C:\Users\me\mybazel\bazel.exe --client_debug version
Expected an error, but bazel returns the version output and doesn't mention the binary bazel.rc.
What operating system are you running Bazel on?
Windows 10 Also tested on Ubuntu Bionic
What's the output of bazel info release?
release 4.0.0
I don't take a position on whether the rc file next to the binary is useful or not, but if we keep the current behavior then we should document it.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage in a comment here and we'll take a look. Thanks!