Location user's build state with `sudo` unclear from documentation
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Page link:
https://bazel.build/remote/output-directories
### Problem description (include actual vs expected text, if applicable):
The [docs](https://bazel.build/remote/output-directories) state:
> The Bazel user's build state is located beneath `outputRoot/_bazel_$USER`. This is called the _outputUserRoot_ directory.
However, this does not seem to be correct.
```
echo $USER
bart
sudo echo $USER
bart
bazel info output_path
/home/bart/.cache/bazel/_bazel_bart/789d3790deff466599799bacb2b9d927/execroot/Maplibre/bazel-out
sudo bazel info output_path
/root/.cache/bazel/_bazel_root/789d3790deff466599799bacb2b9d927/execroot/Maplibre/bazel-out
```
Notice the output path differs and is `_bazel_bart` instead of `_bazel_root` when using `sudo`.
### Where do you see this issue? (include link to specific section of the page, if applicable)
https://bazel.build/remote/output-directories#layout
### Any other information you'd like to share?
_No response_
Contributor guide
Research direction
Start with the Layout section of https://bazel.build/remote/output-directories and compare its outputRoot and outputUserRoot wording with the sudo and non-sudo examples in this issue. Update the documentation to explain the differing user-specific paths, then verify that the documented behavior matches both commands.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100