1--- a/bazel/generate_cc.bzl
2+++ b/bazel/generate_cc.bzl
3@@ -141,6 +141,7 @@ def generate_cc_impl(ctx):
4         outputs = out_files,
5         executable = ctx.executable._protoc,
6         arguments = arguments,
7+        use_default_shell_env = True,
8     )
9
10     return struct(files = depset(out_files))
11