Description of the bug:
scripts/bazel-complete-template.bash does not preserve .bazelrc path boundaries while collecting workspace, home, imported, and --bazelrc= files. Configurations defined in an rc file whose path contains spaces are therefore absent from --config= completion.
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Create a workspace in a directory containing a space.
- Add a
.bazelrc (or an imported rc file) defining a unique config, for example build:space_config.
- Source
scripts/bazel-complete-template.bash and request completion for bazel build --config=.
- Observe that
space_config is missing.
The same loss occurs for quoted imported rc paths and command-line --bazelrc= paths containing spaces.
Which operating system are you running Bazel on?
Linux or macOS (Bash completion)
What is the output of bazel info release?
development version (current master)
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
Source inspection and isolated script-level reproduction against the current master revision.
What's the output of git remote get-url origin; git rev-parse HEAD ?
https://github.com/bazelbuild/bazel.git
680f57bbe5f72e29ac091ba4fcfe12f5f53dc80b
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
Not bisected. The behavior is present on the current master revision.
Have you found anything relevant by searching the web?
Searched open and closed bazelbuild/bazel issues using the affected file name and failure mode. I did not find an issue describing this specific behavior.
Any other information, logs, or outputs that you want to share?
A focused fix covering workspace, home, imported, and command-line rc paths is available in #31325.
Description of the bug:
scripts/bazel-complete-template.bashdoes not preserve.bazelrcpath boundaries while collecting workspace, home, imported, and--bazelrc=files. Configurations defined in an rc file whose path contains spaces are therefore absent from--config=completion.Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
.bazelrc(or an imported rc file) defining a unique config, for examplebuild:space_config.scripts/bazel-complete-template.bashand request completion forbazel build --config=.space_configis missing.The same loss occurs for quoted imported rc paths and command-line
--bazelrc=paths containing spaces.Which operating system are you running Bazel on?
Linux or macOS (Bash completion)
What is the output of
bazel info release?development version (current master)
If
bazel info releasereturnsdevelopment versionor(@non-git), tell us how you built Bazel.Source inspection and isolated script-level reproduction against the current master revision.
What's the output of
git remote get-url origin; git rev-parse HEAD?If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
Not bisected. The behavior is present on the current master revision.
Have you found anything relevant by searching the web?
Searched open and closed bazelbuild/bazel issues using the affected file name and failure mode. I did not find an issue describing this specific behavior.
Any other information, logs, or outputs that you want to share?
A focused fix covering workspace, home, imported, and command-line rc paths is available in #31325.