internal: ensure proto_compile copies files not links

at least in bazel 7.2, this leads to dangling symlink issues, and
the remote cache complains about absolute symlinks.
This commit is contained in:
Paul Stemmet 2024-09-27 17:14:40 +00:00
parent 99827e2d37
commit bfe04468f3
Signed by: Paul Stemmet
GPG Key ID: EDEA539F594E7E75
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ def proto_compile(ctx, options, extra_protoc_args, extra_protoc_files):
# Build copy command for directory outputs
# Use cp {}/. rather than {}/* to allow for empty output directories from a plugin (e.g when
# no service exists, so no files generated)
command_parts = ["mkdir -p {} && cp -r {} '{}'".format(
command_parts = ["mkdir -p {} && cp -L -r {} '{}'".format(
# We need to be sure that the dirs exist, see:
# https://github.com/bazelbuild/bazel/issues/6393
" ".join(["'" + d.path + "'" for d in premerge_dirs]),