Open
Description
Description of the bug:
It is very easy to neglect adding the extra slash required to produce a valid file://
URI.
For example;
--registry=file://home/coder/work/bazel-central-registry
At a glance this looks right, but at runtime you'll end up with an error like the following.
ERROR: Error accessing registry file://home/coder/work/bazel-central-registry: Failed to fetch registry file file://home/coder/work/bazel-central-registry/modules/protobuf/25.3/MODULE.bazel: home. Type 'bazel help mod' for syntax and help.
The only hint as to the cause is the first path segment being the error message, otherwise this is a poor error message that doesn't actually explain what went wrong.
The correct argument would have been;
--registry=file:///home/coder/work/bazel-central-registry
^
Which category does this issue belong to?
Documentation, External Dependency
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
Linux (Ubuntu)
What is the output of bazel info release
?
release 7.4.1
If bazel info release
returns development version
or (@non-git)
, tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD
?
No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response