Skip to content

Commit 57d4584

Browse files
docs: explain how to handle read-only sandbox paths (#221)
Running build without `--sandbox_writable_path=/path/to/cache` might result in `error: unable to create compilation: ReadOnlyFileSystem` which has been reported in Bazel Slack workspace. I have also personally experienced this in a small project of mine. I thought adding this to the docs might help the next user reading it should they face with the same issue.
1 parent 5e65e32 commit 57d4584

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ build --repo_env=HERMETIC_CC_TOOLCHAIN_CACHE_PREFIX=/path/to/cache
9797
build --sandbox_add_mount_pair=/path/to/cache
9898
```
9999
100+
If you get an error `unable to create compilation: ReadOnlyFileSystem`,
101+
try adding `build --sandbox_writable_path=/path/to/cache` to `.bazelrc`
102+
which is known to resolve the issue for some users.
103+
100104
The snippets above will download the zig toolchain and make the bazel
101105
toolchains available for registration and usage. If nothing else is done, this
102106
will work for some minimal use cases. The `.bazelrc` snippet instructs Bazel to

0 commit comments

Comments
 (0)