Correctly add newline character when concatenating schema generated python srcs
The last sed command used for adding the import statement and the '\n' was working as intended on Linux, but was failing on macOS, due to the difference in sed behavior between GNU and BSD. Fixed the issue by using an actual newline character with $'\n', which correctly works on both platforms. Fixes https://github.com/tensorflow/tensorflow/issues/39756 PiperOrigin-RevId: 313691192 Change-Id: I96e5544c03641bae05753e8f7d1346c8aa1c0f6e
This commit is contained in:
parent
12bda81b3d
commit
f9fb66cdb7
2
third_party/flatbuffers/build_defs.bzl
vendored
2
third_party/flatbuffers/build_defs.bzl
vendored
@ -362,7 +362,7 @@ def _concat_flatbuffer_py_srcs_impl(ctx):
|
||||
"sed 's/from flatbuffers." +
|
||||
"/from flatbuffers.python.flatbuffers./' |" +
|
||||
"sed '1s/^/from flatbuffers.python " +
|
||||
"import flatbuffers\\n/' > %s"
|
||||
"import flatbuffers\\'$'\\n/' > %s"
|
||||
) % (
|
||||
ctx.attr.deps[0].files.to_list()[0].path,
|
||||
ctx.outputs.out.path,
|
||||
|
Loading…
Reference in New Issue
Block a user