buildtools
buildtools copied to clipboard
Buildozer: Cannot print `path`of a `local_path_override` rule
I have a MODULE.bazel
file with a local_path_override
:
local_path_override(
module_name = "test_module",
path = "./modules/test_module",
)
When I run buildozer 'print module_name path' //MODULE.bazel:%local_path_override
to get the value of the two attributes, I get:
test_module /home/user/MODULE.bazel
This is wrong: the second part should be ./modules/test_module
.
This is because path
is a builtin special attribute referring to the absolute path to the BUILD file that contains the rules.
https://github.com/bazelbuild/buildtools/blob/main/buildozer/README.md#print-commands
Is this a bug or is there an alternate way of doing this ?